Tins · Primitives
lz4
A Mojo binding to liblz4 covering the block format, the frame format and the legacy Hadoop framing that older Parquet files still use.
Install
plain pixi:
pixi init app -c https://conda.modular.com/max -c conda-forge && cd app
sed -i.bak 's/^\[workspace\]/[workspace]\npreview = ["pixi-build"]/' pixi.toml
pixi add "mojo-compiler==1.2.0"
# Without mojoshelf: the tin as a git dependency at its published commit.
# Transitive dependencies may be wrong: pixi takes the tin's own git deps as
# pinned in its pixi.toml, which may not match what other tins pin, and then
# fails with "duplicate records". mojoshelf picks revisions that agree.
pixi add lz4-mojo --git https://github.com/magmalake/lz4.mojo --rev 23cd6e54967d7e41573371507228ca5c958ca685 No mojoshelf needed. If pixi reports duplicate records, the mojoshelf tab picks revisions that agree.
Version
0.1.4 on mojoshelf
Source
What it does
Works today
- LZ4_RAW blocks for Parquet pages
- LZ4F frames for Iceberg Puffin blobs
- Hadoop framing for legacy Parquet LZ4
Correctness
Checked against CPython's lz4 package, on known vectors and round trips