@zip.js/zip.js 2.7.68 → 2.7.69

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-full.js CHANGED
@@ -8882,7 +8882,7 @@
8882
8882
  if (zip64) {
8883
8883
  updateZip64ExtraField(fileEntry);
8884
8884
  }
8885
- updateLocalHeader(fileEntry, localHeaderView);
8885
+ updateLocalHeader(fileEntry, localHeaderView, options);
8886
8886
  await skipDiskIfNeeded(writable);
8887
8887
  await writeData(writer, localHeaderArray);
8888
8888
  await blob.stream().pipeTo(writable, { preventClose: true, preventAbort: true, signal });
@@ -9276,6 +9276,10 @@
9276
9276
  arraySet(localHeaderArray, rawExtraFieldNTFS, localHeaderOffset);
9277
9277
  localHeaderOffset += getLength(rawExtraFieldNTFS);
9278
9278
  arraySet(localHeaderArray, rawExtraField, localHeaderOffset);
9279
+ if (dataDescriptor) {
9280
+ setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + 4, 0);
9281
+ setUint32(localHeaderView, HEADER_OFFSET_UNCOMPRESSED_SIZE + 4, 0);
9282
+ }
9279
9283
  return {
9280
9284
  localHeaderArray,
9281
9285
  localHeaderView,
@@ -9382,7 +9386,6 @@
9382
9386
 
9383
9387
  function updateLocalHeader({
9384
9388
  rawFilename,
9385
- dataDescriptor,
9386
9389
  encrypted,
9387
9390
  zip64,
9388
9391
  localExtraFieldZip64Length,
@@ -9395,7 +9398,7 @@
9395
9398
  zip64CompressedSize,
9396
9399
  zip64Offset,
9397
9400
  zip64DiskNumberStart
9398
- }, localHeaderView) {
9401
+ }, localHeaderView, { dataDescriptor }) {
9399
9402
  if (!dataDescriptor) {
9400
9403
  if (!encrypted) {
9401
9404
  setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + 4, signature);