# lz4

> lz4, a magmalake tin: A Mojo binding to liblz4 covering the block format, the frame format and the legacy Hadoop framing that older Parquet files still use.

[magmalake](https://magmalake.dev/) [lz4](https://magmalake.dev/s/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

```
pixi shelf add lz4-mojo
```

Version

`0.1.4` on mojoshelf

Source

[GitHub](https://github.com/magmalake/lz4.mojo) [README](https://github.com/magmalake/lz4.mojo#readme) [Benchmark history](https://magmalake.github.io/lz4.mojo/benchmarks/)

## Works today

- LZ4\_RAW blocks for Parquet pages
- LZ4F frames for Iceberg Puffin blobs
- Hadoop framing for legacy Parquet LZ4

Checked against CPython's lz4 package, on known vectors and round trips

- [thrift](https://magmalake.dev/s/thrift) compact + binary protocol
- [zstd](https://magmalake.dev/s/zstd) libzstd
- [brotli](https://magmalake.dev/s/brotli) libbrotli
- [snappy](https://magmalake.dev/s/snappy) pure Mojo
- [deflate](https://magmalake.dev/s/deflate) DEFLATE · gzip · pure Mojo
- [hashes](https://magmalake.dev/s/hashes) CRC-32 · murmur3 · XXH64
- [memory-region](https://magmalake.dev/s/memory-region) bytes addressed by offset · shared mappings
- [threads](https://magmalake.dev/s/threads) pthreads · atomics · parallel\_for
- [Every tin](https://magmalake.dev/tins)

[A magmalake project](https://magmalake.dev/)

Apache 2.0 · © 2026 Marius Seritan
