From 7f13d4d9b614fc9764a1340c5c3b85a428a25cfb Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Sat, 16 Mar 2019 09:18:59 -0700 Subject: [PATCH] fixed incorrect uncompressed size in zip --- app/zip.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/zip.js b/app/zip.js index 6cc57b74..1363da82 100644 --- a/app/zip.js +++ b/app/zip.js @@ -50,7 +50,7 @@ class File { v.setUint32(0, 0x08074b50, true); // sig v.setUint32(4, this.crc, true); // crc32 v.setUint32(8, this.size, true); // compressed size - v.setUint16(12, this.size, true); // uncompressed size + v.setUint32(12, this.size, true); // uncompressed size return new Uint8Array(dd); } @@ -60,7 +60,7 @@ class File { v.setUint32(0, 0x02014b50, true); // sig v.setUint16(4, 20, true); // version made v.setUint16(6, 20, true); // version required - v.setUint16(8, 0, true); // bit flags + v.setUint16(8, 8, true); // bit flags (8 = use data descriptor) v.setUint16(10, 0, true); // compression v.setUint16(12, this.dateTime.time, true); // modified time v.setUint16(14, this.dateTime.date, true); // modified date