Releases: Touffy/client-zip
Releases · Touffy/client-zip
Error propagation
Unicode Filename Flag
2.4.2:
- Filenames can be flagged as UTF-8 using the EFS bit in the file header flags.
- This is configurable with the new
buffersAreUTF8
option.
- This is configurable with the new
- And it should help the Windows Zip utility read non-ASCII filenames correctly.
2.4.1:
- Cancelling the output stream will now cause an error in the source iterator.
Unicode Filename Flag (v1 branch)
1.6.2:
- Filenames can be flagged as UTF-8 using the EFS bit in the file header flags.
- This is configurable with the new
buffersAreUTF8
option.
- This is configurable with the new
- And it should help the Windows Zip utility read non-ASCII filenames correctly.
1.6.1:
- Cancelling the output stream will now cause an error in the source iterator.
No more WebAssembly (for now…)
2.4.0
- No more WASM for CRC32, JavaScript is faster now anyway.
Backporting recent improvements from v2
1.6.0
- No more WASM for CRC32, JavaScript is faster now anyway.
- Added type and exports to package.json so client-zip can run in Node.js.
- Remove trailing slashes from file names.
- Fixed filename extraction from a Response when its URL has a trailing slash.
- Fixed content-length prediction when some files have a length of zero (previously, this threw an error).
Empty folders, filename heuristics
2.3.0
- Fixed filename extraction from a Response when its URL has a trailing slash.
- Empty folders may be added to the archive with
{ name, lastModified? }
.- Remove trailing slashes from file names and add one to folder names if needed.
- Also export
makeZip
which returns a ReadableStream without its Response wrapper.
Content-Length prediction
2.2.0 (with typing and empty file size bugs fixed in 2.2.2 and 2.2.1)
- Zip file size can now be predicted by the
predictLength
function before creating it. - Added an options parameter to
downloadZip
.- options.length can be set to include a "Content-Length" header in the Response.
- options.metadata can instead be given the same argument as
predictLength
, as a shortcut to compute and set the Content-Length.
Content-Length prediction (without Zip64)
1.5.0 (and a typing fix in 1.5.1)
- Zip file size can now be predicted by the
predictLength
function before creating it. - Added an options parameter to
downloadZip
.- options.length can be set to include a "Content-Length" header in the Response.
- options.metadata can instead be given the same argument as
predictLength
, as a shortcut to compute and set the Content-Length.
- The worker script now supports all the input types supported in the ES module, not only Responses.
Small files in big archives
2.0.1
- Fixed a bug where small files requiring a 64-bit offset (but not size) were corrupted.
- Never use 64-bit sizes in data descriptor for small files, even at large offsets.
Zip64
2.0.0
- At last ! client-zip now generates Zip64 archives (only when necessary).
- To do that, it uses BigInts which makes it incompatible with anything older than 2020. Fall back to version 1.x if you need to support older browsers. Or it wouldn't be too hard to ponyfill the BigInts, actually.