@zip.js/zip.js 2.7.47 → 2.7.48

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.
@@ -265,6 +265,7 @@ async function addFile(zipWriter, name, reader, options) {
265
265
  const bufferedWrite = getOptionValue(zipWriter, options, "bufferedWrite");
266
266
  const dataDescriptorSignature = getOptionValue(zipWriter, options, "dataDescriptorSignature", false);
267
267
  const signal = getOptionValue(zipWriter, options, "signal");
268
+ const useUnicodeFileNames = getOptionValue(zipWriter, options, "useUnicodeFileNames", true);
268
269
  const useCompressionStream = getOptionValue(zipWriter, options, "useCompressionStream");
269
270
  let dataDescriptor = getOptionValue(zipWriter, options, "dataDescriptor", true);
270
271
  let zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);
@@ -346,6 +347,7 @@ async function addFile(zipWriter, name, reader, options) {
346
347
  zipCrypto,
347
348
  bufferedWrite,
348
349
  keepOrder,
350
+ useUnicodeFileNames,
349
351
  dataDescriptor,
350
352
  dataDescriptorSignature,
351
353
  signal,
@@ -684,6 +686,7 @@ function getHeaderInfo(options) {
684
686
  level,
685
687
  zip64,
686
688
  zipCrypto,
689
+ useUnicodeFileNames,
687
690
  dataDescriptor,
688
691
  directory,
689
692
  rawExtraField,
@@ -740,7 +743,10 @@ function getHeaderInfo(options) {
740
743
  } else {
741
744
  rawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();
742
745
  }
743
- let bitFlag = BITFLAG_LANG_ENCODING_FLAG;
746
+ let bitFlag = 0;
747
+ if (useUnicodeFileNames) {
748
+ bitFlag = bitFlag | BITFLAG_LANG_ENCODING_FLAG;
749
+ }
744
750
  if (dataDescriptor) {
745
751
  bitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;
746
752
  }
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.7.47",
6
+ "version": "2.7.48",
7
7
  "type": "module",
8
8
  "keywords": [
9
9
  "zip",