Skip to content

Commit 7f13d4d

Browse files
committed
fixed incorrect uncompressed size in zip
1 parent 0e81ef2 commit 7f13d4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/zip.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class File {
5050
v.setUint32(0, 0x08074b50, true); // sig
5151
v.setUint32(4, this.crc, true); // crc32
5252
v.setUint32(8, this.size, true); // compressed size
53-
v.setUint16(12, this.size, true); // uncompressed size
53+
v.setUint32(12, this.size, true); // uncompressed size
5454
return new Uint8Array(dd);
5555
}
5656

@@ -60,7 +60,7 @@ class File {
6060
v.setUint32(0, 0x02014b50, true); // sig
6161
v.setUint16(4, 20, true); // version made
6262
v.setUint16(6, 20, true); // version required
63-
v.setUint16(8, 0, true); // bit flags
63+
v.setUint16(8, 8, true); // bit flags (8 = use data descriptor)
6464
v.setUint16(10, 0, true); // compression
6565
v.setUint16(12, this.dateTime.time, true); // modified time
6666
v.setUint16(14, this.dateTime.date, true); // modified date

0 commit comments

Comments
 (0)