Skip to content
YadeWira edited this page Oct 10, 2026 · 12 revisions

lz6

lz6 is an experimental lossless compressor aiming at maximum compression with fast decompression. It is the successor of LZ4 and LZ5 v1.5: it started as a fork of LZ5 and grew into its own codec family, with an intentionally incompatible format.

Its competitors are the fast-decoding compressors in the same space:

codec what it is where lz6 stands
zstd LZ77 + FSE/Huffman, the generalist on one thread (Silesia, one session of 2026-10-09) lz6 decodes 1.1-1.4x faster than zstd at the same ratio from level 2 up (lz6 -3 28.79% vs zstd -6 28.89%: 1.23x; lz6 -15 25.12% vs zstd -19 24.96%: 1.40x) and encodes slower (0.57-0.86x, 3.8x at the top); zstd -1 still decodes 1.16x faster than lz6 -1 and zstd -3 is 0.37 points smaller than lz6 -2. lz6 also wins where its transforms apply (ooffice, x86 code: 4-5 points; x-ray, byte planes: 5-8 points), on AIT (mostly through one PRNG file) and in decode throughput with -T (see Benchmarks)
lizard LZ5 successor with entropy modes lz6 -15 is 3.5 points smaller on Silesia (25.12% vs 28.62%); lizard -49 decodes 1.11x faster than lz6 -3 (28.62% vs 28.79%) but encodes at 1.9 MB/s
misa77 write-once/read-many LZ, memcpy-class decode misa77 decodes ~4.6x faster (5.2 GB/s against 1.1 GB/s) at a ~17.5 points worse ratio (Silesia)
LZ4 / LZ5 byte-wise LZ77, no entropy stage what lz6 replaces: 5-19 points smaller than lz5 HC, 21-29 smaller than lz4

See Benchmarks for the measured numbers.

Pages

  • Getting Started: build, CLI, levels
  • Architecture: the two engines, per-block dispatch (LZ6S2), content segmentation (LZ6S3), transforms
  • Seq Stream Format: byte-level layout of a seq block
  • Decoder Internals: how the seq decoder is organised and why
  • Portable Profile: the frozen byte-aligned HC format, decodable by any zpaq through a ZPAQL post-processor
  • Benchmarks: lz6 against zstd, lizard, misa77, lz4, lz5
  • Development: the bakeoff/ harness, safety gates, corpora, workflow rules
  • Roadmap: open directions, including format-level options for decode speed

Status

Experimental: the seq block format changes between -pre versions without a compatibility shim (see NEWS). The frame HC levels (--hc) are stable. Decoders are fuzz-tested (corrupt raw streams and corrupt frames through the full LZ6F_decompress path, ASAN + UBSan, exact-size output buffers); Windows binaries are VM-tested on Windows 7 SP1 x64 and Windows 10.

Clone this wiki locally