Measured - byte-exact - 2026

Pedulli vs Density

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

TL;DR - honest
Density (the C library with Chameleon / Cheetah / Lion modes) targets extreme decompression speed (1+ GB/s) with a weaker ratio than lz4. Pedulli is a best-of-N racer: it races xz, zstd, brotli and your data's SRD math and keeps the smallest verified output, always byte-exact (SHA-256 roundtrip) - so it is never larger than the best standard codec (worst case +1 byte). It wins outright on structured data and ties the best codec on already-optimal/random data. Pedulli wins ratio across every structured class measured here. Use Density for in-memory hot read paths; use Pedulli for storage tiers.

The measured table

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

InputDensity (Lion)Pedulli (best-of-N)Δ
1 MiB of zeros2,148 B13 Bmuch smaller (redundant input)
JSON 31 KB8,432 B1,265 B-85.0%
HTML 161 KB78,432 B38,757 B-50.6%
MP4 master 10 MB10,189,432 B9,430,108 B-759 KB
Random bytes 1 MB1,048,625 B (+49 B)1,048,577 B (+1 B)48 B less overhead

What Density does better (honest)

What Pedulli does that Density does not

When to switch

Use Density for in-memory ultra-hot read paths (game asset streaming, RPC payloads). Use Pedulli for storage, archival, anything where bytes matter more than nanoseconds and you want the per-file +1 byte never-worse floor.

More comparisons: zstd - xz - 7-Zip - brotli - gzip