Tins · Primitives

deflate

DEFLATE (RFC 1951) and gzip (RFC 1952) in pure Mojo, the compression inside Avro's deflate codec and Parquet's GZIP codec. No FFI, no libz.

Install
pixi shelf add deflate-mojo
Version

0.1.3 on mojoshelf

Source

What it does

Works today

  • inflate for stored, fixed- and dynamic-Huffman blocks
  • deflate with a hash-chain LZ77 matcher, fixed-Huffman blocks
  • inflate_at for back-to-back streams, as gzip members are
  • gunzip for a whole .gz file: every member, header flags, each member's CRC-32 and size checked; gzip to write one

Correctness

Checked against zlib: inflates what zlib wrote, one fixture per block type

Also in Primitives