Home - YadeWira/lz6 GitHub Wiki

lz6

Level numbers. The measurements on this page use the seq level numbers of v1.6.11-pre. v1.6.12-pre renumbered them: the old -N is -(N-2) now for N >= 3 (old -3 = -1, old -15 = -13) and the old -2 and -1 are --fast=1 and --fast=2 (a smaller, slower fast tier now: 30.45% and 32.56% on Silesia). See Getting-Started.

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 started as the fast-decoding compressors in the same space (zstd, lizard, misa77). Since 2026-10-18 the main yardstick is the LZMA family and zpaq (xz, lzma, fast-lzma2, uf-lzma2, zpaq 7.15, zpaqfranz, with RAR as a closed-source reference): lz6 aims at their ratio with a much faster decode. Both groups:

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)
LZMA family: xz / lzma, fast-lzma2, uf-lzma2 the ratio class lz6 is moving toward (v1.6.12-pre numbering, 2026-10-19) lz6 -13 decodes 9-13x faster on Silesia (1,118 MB/s against 88-124) and 19-27x on AIT, at a size about 2 points larger (24.98% against 22.88-23.02%); on AIT it is ahead of xz -9, lzma -9 and fast-lzma2 (45.36% against 45.92 / 46.00 / 45.50; uf-lzma2 -11 reaches 44.13%). The entry level -1 (28.77%) is 4% bigger than xz -1 (27.70%) at 3x the encode speed and 11-14x the decode speed. The gaps left: sao +15%, mozilla +15%, samba +12%, mr +12%, xml +10% against xz -9
zpaq 7.15 / zpaqfranz, RAR 7.23 zpaq: context mixing, symmetric and ~0.35 MB/s; RAR: closed source, LZ plus filters zpaq -m5 is 19-26% smaller than everything else and ~3,000x slower to decode (Silesia 18.45%); RAR -m5 is level with lz6 -13 on Silesia (25.07% against 24.98%: it wins mr, x-ray, mozilla, ooffice, samba, xml, AIT H) and 3 points behind on AIT (48.62% against 45.36%)
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: the zstd, lizard, misa77 and lz4 rows are the 2026-10-09 session (v1.6.11-pre level numbers, see the note above), the LZMA/zpaq/RAR rows the 2026-10-19 session.

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); v1.6.12-pre extends it (byte-delta plane lanes: every v1.6.11-pre stream still decodes, a stream that uses them needs v1.6.12-pre) and renumbers the levels. 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 (win64 and win32) are VM-tested on Windows 7 SP1 and Windows 10.