npm @zip.js/zip.js 2.9.0

latest releases: 2.24.0, 2.23.0, 2.22.1...
one month ago

What's Changed in v2.9.0

New features

  • New WARNING_PREPENDED_CENTRAL_DIRECTORY warning, deposited when the data found before the archive holds a central directory of its own. It tells apart the two shapes producing the WARNING_PREPENDED_DATA warning, a self-extracting stub carrying the archive and several archives concatenated, which were indistinguishable until now. The distinction matters because the readers disagree on the archive to read in the second case: zip.js, Info-ZIP and Python read the last one, 7-Zip reads the first one. The new warning costs no additional read, it reports what the search of the end of central directory already saw

Bug fixes

  • The CP437 table decoding the names of the entries not marked as UTF-8 is now written with escape sequences, and the whole build output is free of non-ASCII characters. The table was made of literal characters, so a build parsed as something else than UTF-8, e.g. inlined in a page declaring another charset, read a table longer than 256 entries. The check comparing its length to 256 then fell back to TextDecoder, which decodes UTF-8, so every byte past ASCII became a replacement character instead of the expected name. The minified files grow by 438 bytes and shrink by 177 bytes once compressed

Tests and continuous integration

  • The build now fails when the output holds a non-ASCII character
  • New test covering the archives concatenated with each other, verifying that the entries of the last archive are the ones reported and that a prefix holding no central directory does not deposit the new warning

Don't miss a new zip.js release

NewReleases is sending notifications on new releases.