JavaScript library to zip and unzip files supporting multi-core compression, compression streams, zip64, split files and encryption.
BSD-3-CLAUSE License
Bot releases are hidden (Show)
workerScriptsPath
is now totally obsolete and you don't need to copy z-worker.js
anymore in your library folder to use web workers.z-worker.js
with the setting workerScripts
if necessary (e.g. if the CSP of the page does not allow a Blob URI as a web worker URL).zip
: Fix typo in constant name zip.ERR_INVALID_PASSWORD
(was previously named zip.ERR_INVALID_PASSORD
)zip
: Add properties Entry#filenameUT8
and Entry#commentUT8
which help to determine if respectively the filename and the comment are encoded in UTF-8 in the zip filezip
: Fix support of UTF8 comments stored in extra fieldszip.fs
: Fix support of options
parameter when importing/exporting dataThe path of the scripts after the first one in workerScripts
will be be resolved against the URL of the first script instead
of the base URI of the page. For example with the version 2.0.x, if you had in your code something similar to this:
zip.configure({
workerScripts: {
inflate: ["./lib/z-worker-pako.js", "./lib/pako_inflate.min.js"]
}
});
You must replace it with:
zip.configure({
workerScripts: {
inflate: ["./lib/z-worker-pako.js", "./pako_inflate.min.js"] // pako_inflate.min.js is in the same folder than z-worker-pako.js
}
});
ZipFileEntry#replaceBlob
and ZipFileEntry#replaceText
methods in the FileSystem APIZipWriter#add
returns a Promise with an Entry
object as resolved value instead of undefined
ZipWriter.add
in parallel with the same instance of options object (fix wasn't ok in v2.0.9)ZipReader.getEntries
in order to use a user-provided encoding for filenames and commentsuseWebWorkers
option when calling ZipReader
, ZipWriter
constructors and ZipReader#getData
, ZipWriter#add
to force enabling/disabling the usage of web workersversion
unescape
and encodeURIComponent
in the code (replaced with TextEncoder
)FS
API in the types declaration fileZipWriter#add
Published by gildas-lormeau almost 4 years ago