Measured - byte-exact - 2026

Pedulli vs zlib-ng

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

TL;DR - honest
zlib-ng is the modern drop-in zlib replacement - same DEFLATE output as gzip, but several times faster on AVX2 CPUs. Pedulli is a best-of-N racer: it runs several internal coders and keeps the smallest output, always byte-exact (SHA-256 roundtrip) with a +1 byte never-worse floor. Pedulli wins ratio across every structured class measured here; zlib-ng wins throughput when you need DEFLATE-compatible output on the wire.

The measured table

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

Inputzlib-ng -9Pedulli (best-of-N)Δ
1 MiB of zeros1,041 B13 Bmuch smaller (redundant input)
JSON 31 KB4,820 B1,265 B-73.7%
HTML 161 KB52,103 B38,757 B-25.6%
MP4 master 10 MB9,742,892 B9,430,108 B-312 KB
Random bytes 1 MB1,048,768 B (+192 B)1,048,577 B (+1 B)191 B less overhead

What zlib-ng does better (honest)

What Pedulli does that zlib-ng does not

When to switch

Use zlib-ng for high-throughput DEFLATE-compatible streaming (HTTP Content-Encoding: gzip, PNG, ZIP archives). Use Pedulli for cold storage, archives, anything where ratio matters more than wire compatibility, plus the per-file +1 byte never-worse floor.

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