Skip to content

v0.1.0

Latest

Choose a tag to compare

@kylemwhite kylemwhite released this 06 Nov 15:23

Install: luarocks install mdzip-core-lua (LuaRocks)

First version. Implements MDZip spec 1.2 and passes the spec's shared fixtures from v1.2.1, including the T-018 ZIP-bomb tests. Pure Lua 5.3+, no dependencies.

  • Reading: mdzip.open (bytes) and open_file, entries, files, directories, documents, special_entries, find, has, read, read_text, manifest, spec_version, entry_point, mode, title.
  • Links: resolve_link inside the archive (spec 9.3). Links out of or into archives come back unresolved.
  • Validation: validate() / mdzip.validate(bytes), with spec error codes and WARN_* warnings.
  • Writing: mdzip.create / create_file, and archive:update / mdzip.update_file, which copies untouched entries as stored, keeps unknown manifest fields in order, keeps symbolic links with a warning, and refuses changes that would move or break the entry point.
  • Safety: rejects unsafe, duplicate and conflicting paths, encrypted entries, compression other than stored/DEFLATE, overlapping entries; never follows symbolic links; built-in limits on entry count, sizes and compression ratio, checked at open and again while decompressing.
  • Built in: ZIP reading/writing, DEFLATE, CRC-32, strict JSON, and Unicode NFC and case folding (data from Unicode 16.0, generated by tools/gen_unicode.py).