Tins · Primitives

brotli

A Mojo binding to libbrotli, the last of the seven Parquet page codecs. Bound rather than written: RFC 7932 needs two prefix-code forms, context maps, block-type switching, a distance cache and a 122 KB static dictionary with 121 word transforms that are part of the format itself.

Install
pixi shelf add brotli-mojo
Version

0.1.4 on mojoshelf

What it does

Works today

  • One-shot compress and decompress, quality 0–11
  • A Brotli stream records no uncompressed size, so sized and unsized decoding are separate calls
  • The shim is dlopen'd once, not per call

Correctness

Checked against CPython's brotli package, on streams it produced and this one had never seen

Also in Primitives