@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.
- package/deno.json +1 -1
- package/dist/zip-fs-full.js +7 -1
- package/dist/zip-fs-full.min.js +1 -1
- package/dist/zip-fs.js +7 -1
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-full.js +7 -1
- package/dist/zip-full.min.js +1 -1
- package/dist/zip-no-worker-deflate.min.js +1 -1
- package/dist/zip-no-worker.min.js +1 -1
- package/dist/zip.js +7 -1
- package/dist/zip.min.js +1 -1
- package/index.cjs +7 -1
- package/index.d.ts +9 -1
- package/index.min.js +1 -1
- package/lib/core/zip-writer.js +7 -1
- package/package.json +1 -1
package/lib/core/zip-writer.js
CHANGED
|
@@ -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 =
|
|
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