@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.
package/dist/zip.js CHANGED
@@ -5248,6 +5248,9 @@
5248
5248
  setUint32(rawExtraFieldZip64View, rawExtraFieldZip64Offset, diskNumberStart);
5249
5249
  rawExtraFieldZip64Offset += 4;
5250
5250
  }
5251
+ if (rawLocalExtraFieldZip64Offset == 4) {
5252
+ rawLocalExtraFieldZip64 = new Uint8Array();
5253
+ }
5251
5254
  }
5252
5255
  } else {
5253
5256
  rawExtraFieldZip64 = new Uint8Array();
@@ -5559,22 +5562,22 @@
5559
5562
  if (!encrypted) {
5560
5563
  setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + 4, signature);
5561
5564
  }
5562
- if (!zip64) {
5565
+ if (!zip64CompressedSize) {
5563
5566
  setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + 4, compressedSize);
5567
+ }
5568
+ if (!zip64UncompressedSize) {
5564
5569
  setUint32(localHeaderView, HEADER_OFFSET_UNCOMPRESSED_SIZE + 4, uncompressedSize);
5565
5570
  }
5566
5571
  }
5567
- if (zip64) {
5568
- if (localExtraFieldZip64Length) {
5569
- let localHeaderOffset = HEADER_SIZE + getLength(rawFilename) + 4;
5570
- if (zip64UncompressedSize) {
5571
- setBigUint64(localHeaderView, localHeaderOffset, BigInt(uncompressedSize));
5572
- localHeaderOffset += 8;
5573
- }
5574
- if (zip64CompressedSize) {
5575
- setBigUint64(localHeaderView, localHeaderOffset, BigInt(compressedSize));
5576
- localHeaderOffset += 8;
5577
- }
5572
+ if (zip64 && localExtraFieldZip64Length) {
5573
+ let localHeaderOffset = HEADER_SIZE + getLength(rawFilename) + 4;
5574
+ if (zip64UncompressedSize) {
5575
+ setBigUint64(localHeaderView, localHeaderOffset, BigInt(uncompressedSize));
5576
+ localHeaderOffset += 8;
5577
+ }
5578
+ if (zip64CompressedSize) {
5579
+ setBigUint64(localHeaderView, localHeaderOffset, BigInt(compressedSize));
5580
+ localHeaderOffset += 8;
5578
5581
  }
5579
5582
  }
5580
5583
  }