@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-fs.js CHANGED
@@ -4667,7 +4667,7 @@
4667
4667
  if (zip64) {
4668
4668
  updateZip64ExtraField(fileEntry);
4669
4669
  }
4670
- updateLocalHeader(fileEntry, localHeaderView);
4670
+ updateLocalHeader(fileEntry, localHeaderView, options);
4671
4671
  await skipDiskIfNeeded(writable);
4672
4672
  await writeData(writer, localHeaderArray);
4673
4673
  await blob.stream().pipeTo(writable, { preventClose: true, preventAbort: true, signal });
@@ -5061,6 +5061,10 @@
5061
5061
  arraySet(localHeaderArray, rawExtraFieldNTFS, localHeaderOffset);
5062
5062
  localHeaderOffset += getLength(rawExtraFieldNTFS);
5063
5063
  arraySet(localHeaderArray, rawExtraField, localHeaderOffset);
5064
+ if (dataDescriptor) {
5065
+ setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + 4, 0);
5066
+ setUint32(localHeaderView, HEADER_OFFSET_UNCOMPRESSED_SIZE + 4, 0);
5067
+ }
5064
5068
  return {
5065
5069
  localHeaderArray,
5066
5070
  localHeaderView,
@@ -5167,7 +5171,6 @@
5167
5171
 
5168
5172
  function updateLocalHeader({
5169
5173
  rawFilename,
5170
- dataDescriptor,
5171
5174
  encrypted,
5172
5175
  zip64,
5173
5176
  localExtraFieldZip64Length,
@@ -5180,7 +5183,7 @@
5180
5183
  zip64CompressedSize,
5181
5184
  zip64Offset,
5182
5185
  zip64DiskNumberStart
5183
- }, localHeaderView) {
5186
+ }, localHeaderView, { dataDescriptor }) {
5184
5187
  if (!dataDescriptor) {
5185
5188
  if (!encrypted) {
5186
5189
  setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + 4, signature);