Measured - byte-exact - 2026

Pedulli vs bzip2

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

TL;DR - honest
bzip2 (Burrows-Wheeler + Huffman) is a classic mid-90s codec. Pedulli is a best-of-N racer - it races xz, zstd, brotli and your data's SRD math and keeps the smallest verified output, so it is never larger than the best standard codec (worst case +1 byte). It wins outright on JSON, periodic, sparse and MP4, ties the best codec on already-optimal data, and adds +1 byte where bzip2 adds 44.

The measured table

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

Inputbzip2 -9Pedulli (best-of-N)Δ
1 MiB of zeros47 B13 Bmuch smaller (redundant input)
1 MiB periodic binary1,041 B436 B-58%
JSON 31 KB2,937 B1,265 B-57%
Long English prose 500 KB~138 KB~138 KBties best codec (racer selects it)
HTML 161 KB37,210 B37,210 Bties best codec (racer selects it)
Apache logs 3.5 MB234 KB217 KB-7.3%
MP4 master 10 MB9,789,123 B9,430,108 B-359 KB
Random bytes 1 MB1,048,620 B (+44 B)1,048,577 B (+1 B)43 B less overhead

Where bzip2 has an edge (honest)

What Pedulli does that bzip2 does not

When to use which

Use bzip2 when you want a zero-dependency shell tool that ships with the OS. Use Pedulli for JSON, MP4, periodic, logs and programmatic pipelines - and because it races the standard codecs and keeps the smallest verified output, it is never larger than the best of them on any input (worst case +1 byte).

More comparisons: gzip - xz - 7-Zip - zpaq