Measured - byte-exact - 2026

Pedulli vs lz4

measured head-to-head - structured data classes - byte-exact SHA-256 verified

TL;DR - honest
lz4 was designed for extreme decompression throughput and accepts a weaker ratio in exchange. Pedulli is a best-of-N racer - it races xz, zstd, brotli and your data's SRD math, keeps the smallest verified output, and never ships a larger one (worst case +1 byte over its own input). On ratio it is never larger than the best standard codec: it wins outright on structured data and ties the best codec on already-optimal/random data. lz4 wins raw throughput. They serve different jobs.

The measured table

All numbers measured on this server, roundtrip-verified SHA-256 byte-exact. Proofs available on request.

Inputlz4 -9Pedulli (best-of-N)Δ
1 MiB of zeros4,184 B13 Bmuch smaller (redundant input)
JSON 31 KB6,238 B1,265 B-80%
HTML 161 KB63,488 B38,757 B-39%
Apache logs 3.5 MB489 KB217 KB-55.6%
MP4 master 10 MB10,156,032 B9,430,108 B-711 KB
Random bytes 1 MB1,048,605 B (+29 B)1,048,577 B (+1 B)28 B less overhead

What lz4 does better (honest)

What Pedulli does that lz4 does not

When to use which

Use lz4 when latency dominates and ratio is secondary (in-memory caches, compressed swap, read-path decompression). Use Pedulli when ratio matters: cold storage, log archives, video masters, JSON archival - plus the per-file +1 byte never-worse floor.

More comparisons: zstd - Snappy - LZO - lzop