zip.js

JavaScript library to zip and unzip files supporting multi-core compression, compression streams, zip64, split files and encryption.

BSD-3-CLAUSE License

Downloads
3.4M
Stars
3.4K
Committers
28

Bot releases are hidden (Show)

zip.js -

Published by gildas-lormeau over 3 years ago

  • This version embeds the web worker code in the library itself.
    The setting workerScriptsPath is now totally obsolete and you don't need to copy z-worker.js anymore in your library folder to use web workers.
    You can still copy and import 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.js -

Published by gildas-lormeau over 3 years ago

  • 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 file
  • zip: Fix support of UTF8 comments stored in extra fields
  • zip.fs: Fix support of options parameter when importing/exporting data
zip.js -

Published by gildas-lormeau over 3 years ago

  • Breaking change

The 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
  }
});

  • Fix a regression introduced in the version 2.0.13 when decoding UTF-8 filenames/comments found in the corresponding Extra Field
  • Add ZipFileEntry#replaceBlob and ZipFileEntry#replaceText methods in the FileSystem API
  • ZipWriter#add returns a Promise with an Entry object as resolved value instead of undefined
zip.js -

Published by gildas-lormeau over 3 years ago

Update compiled code

zip.js -

Published by gildas-lormeau over 3 years ago

  • Include deflate.js and inflate.js as modules in zip.js and z-worker.js. You don't need to include deflate.js and inflate.js anymore in your page and your /lib folder. They have also been removed from the /dist folder.
  • Minor code improvements
zip.js -

Published by gildas-lormeau over 3 years ago

  • Fix potential race condition bug when calling multiple times ZipWriter.add in parallel with the same instance of options object (fix wasn't ok in v2.0.9)
  • Add options parameter to ZipReader.getEntries in order to use a user-provided encoding for filenames and comments
zip.js -

Published by gildas-lormeau over 3 years ago

  • Fix potential race condition bug when calling ZipWriter.add in parallel with the same instance of options object
  • Add validation of the last modification date given as an option when calling ZipWriter.add
zip.js -

Published by gildas-lormeau over 3 years ago

  • Add useWebWorkers option when calling ZipReader, ZipWriter constructors and ZipReader#getData, ZipWriter#add to force enabling/disabling the usage of web workers
  • Fix handling of the option version
  • Remove usage of unescape and encodeURIComponent in the code (replaced with TextEncoder)
  • Add FS API in the types declaration file
  • Various improvements in the code
zip.js -

Published by gildas-lormeau over 3 years ago

  • Fix parsing of filenames and comments encoded in CP437
  • Fix handling of UTF8 filenames and comments stored as extra fields
zip.js -

Published by gildas-lormeau over 3 years ago

  • Fix issue when writing UTF-8 filenames/comments
  • Data copy (i.e. unzipping a non-compressed content without checking the signature) is done in the main thread instead of web workers to improve performances
zip.js -

Published by gildas-lormeau over 3 years ago

  • Fix handling of empty filenames
  • Fix version number in the central directory when a file is encrypted
  • Expose zip.ERR_HTTP_RANGE
  • Add error constants in the typedef file
zip.js -

Published by gildas-lormeau over 3 years ago

  • Fix issue where the worker pool could contain zombie processes on errors
  • Throw exceptions as late as possible when reading a zip file
  • Test if the filename, the comment, and the extra field data does not exceed the maximum size/value when calling ZipWriter#add
zip.js -

Published by gildas-lormeau almost 4 years ago

  • Throw encryption/compression errors in Entry#getData instead of ZipReader#getEntries
  • Add property Entry#encrypted set to true when the file entry is encrypted.
zip.js -

Published by gildas-lormeau almost 4 years ago

  • Fix a bug when deflating and inflating files in parallel
  • Add types definition of the Core API
zip.js - version 2.0.0

Published by gildas-lormeau almost 4 years ago