Consider using Zstandard and/or LZ4 instead of Deflate
Deflate vs. Zstd/LZ4 in 2025
- Many argue Deflate is now surpassed on almost every technical metric (compression ratio, speed) except ubiquity and, possibly, very-low-end devices.
- Some suggest LZ4 is better than Deflate even on microcontrollers due to simpler and smaller decoders; others counter that zlib’s age doesn’t automatically make it more portable.
- Memory use is raised: Deflate’s small 32 KB window can be an advantage vs. zstd’s default 8 MB, though zstd’s window is tunable.
“ZPNG” (PNG + Zstd) vs Existing Formats
- Benchmark data shows ZPNG compresses slower than lossless WebP at high-effort settings and produces larger files, but with much faster encode speeds at lower settings and significantly faster decode (~2.5× vs WebP m5).
- Some see big wins for server-side or screenshot use (fast encoding, frequent decoding); others say image decode is rarely the bottleneck vs network latency or other page work.
- Concern that “ZPNG” is effectively a new format, with extra maintenance and vulnerability surface, for relatively modest web-facing benefits.
Alternatives: JPEG XL, WebP, AVIF, QOI, fpng
- JPEG XL is repeatedly cited as a superior “next-gen” image format (progressive decoding, HDR, animation, JPEG recompression), but browser support—especially Chrome/Firefox—is the main blocker.
- Comparisons to JPEG 2000: some predict a similar fate; others note much broader non-browser ecosystem support for JXL.
- WebP/AVIF already cover many web use-cases; some question adding yet another codec.
- QOI/QOIR and PNG-specialized Deflate encoders (e.g., fpng/fpnge) show that you can get large speedups with PNG-compatible Deflate, at some cost in compression ratio.
Compatibility, Deployment, and Governance
- Strong sentiment that PNG’s greatest strength is universal support; changing its core compression risks fragmenting that.
- Past history (delay of APNG, persistence of GIF, slow adoption of new formats) is used as evidence that even good technical ideas can stall.
- Browser vendors’ security concerns (large C++ codec stacks) and platform power dynamics are seen as major adoption barriers, beyond pure technical merit.
Zstd and Specialized Uses
- Zstd’s dictionary feature is highlighted as powerful for structured data (e.g., Minecraft worlds), but considered ill-suited to PNG pixel data.
- Some report large practical gains from replacing Deflate with faster compressors (Snappy, LZ4, zstd) in non-image domains where decompression latency dominates.