@zip.js/zip.js 2.8.13 → 2.8.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1091,6 +1091,9 @@ function getHeaderInfo(options) {
1091
1091
  setUint32(rawExtraFieldZip64View, rawExtraFieldZip64Offset, diskNumberStart);
1092
1092
  rawExtraFieldZip64Offset += 4;
1093
1093
  }
1094
+ if (rawLocalExtraFieldZip64Offset == 4) {
1095
+ rawLocalExtraFieldZip64 = new Uint8Array();
1096
+ }
1094
1097
  }
1095
1098
  } else {
1096
1099
  rawExtraFieldZip64 = new Uint8Array();
@@ -1402,22 +1405,22 @@ function updateLocalHeader({
1402
1405
  if (!encrypted) {
1403
1406
  setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + 4, signature);
1404
1407
  }
1405
- if (!zip64) {
1408
+ if (!zip64CompressedSize) {
1406
1409
  setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + 4, compressedSize);
1410
+ }
1411
+ if (!zip64UncompressedSize) {
1407
1412
  setUint32(localHeaderView, HEADER_OFFSET_UNCOMPRESSED_SIZE + 4, uncompressedSize);
1408
1413
  }
1409
1414
  }
1410
- if (zip64) {
1411
- if (localExtraFieldZip64Length) {
1412
- let localHeaderOffset = HEADER_SIZE + getLength(rawFilename) + 4;
1413
- if (zip64UncompressedSize) {
1414
- setBigUint64(localHeaderView, localHeaderOffset, BigInt(uncompressedSize));
1415
- localHeaderOffset += 8;
1416
- }
1417
- if (zip64CompressedSize) {
1418
- setBigUint64(localHeaderView, localHeaderOffset, BigInt(compressedSize));
1419
- localHeaderOffset += 8;
1420
- }
1415
+ if (zip64 && localExtraFieldZip64Length) {
1416
+ let localHeaderOffset = HEADER_SIZE + getLength(rawFilename) + 4;
1417
+ if (zip64UncompressedSize) {
1418
+ setBigUint64(localHeaderView, localHeaderOffset, BigInt(uncompressedSize));
1419
+ localHeaderOffset += 8;
1420
+ }
1421
+ if (zip64CompressedSize) {
1422
+ setBigUint64(localHeaderView, localHeaderOffset, BigInt(compressedSize));
1423
+ localHeaderOffset += 8;
1421
1424
  }
1422
1425
  }
1423
1426
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A JavaScript library to zip and unzip files in the browser, Deno and Node.js",
4
4
  "author": "Gildas Lormeau",
5
5
  "license": "BSD-3-Clause",
6
- "version": "2.8.13",
6
+ "version": "2.8.14",
7
7
  "type": "module",
8
8
  "keywords": [
9
9
  "zip",