← All comparisons

XZ vs Zstandard

A side-by-side feature comparison.

Summary

XZ holds the crown for raw compression ratio on most general data, but Zstandard catches up at its highest levels and decompresses an order of magnitude faster. The right choice depends on whether you optimize for download size or wall-clock time.

Bottom line: XZ if disk and bandwidth dominate. Zstandard if humans (or pipelines) are waiting on the decompression.

Feature comparison

Feature XZ Zstandard
Algorithm LZMA2 Zstandard (FSE + LZ77)
Best ratio Smallest Closes gap at -19
Decompression speed Slow 3-5× faster
Threading Available with -T Native
Dictionary mode No Yes
Memory at decompress Up to 65 MB Configurable

About XZ

XZ is a single-file compressor wrapping the LZMA2 algorithm, released in 2009 by the Tukaani Project. It produces the smallest files of any mainstream Unix compressor, with strong integrity checks (CRC32, CRC64, SHA-256). XZ is now the default packaging format for many Linux distributions, replacing GZIP and BZIP2 for kernel and source releases.

Read the full XZ guide →

About Zstandard

Zstandard, or zstd, is a modern compression algorithm released by Facebook in 2016. It targets a wide range of compression levels (1-22), giving developers the choice between gzip-class speed and xz-class ratios from a single tool. Zstd has become the default compression for Arch Linux packages, Btrfs, ZFS, and the Linux kernel.

Read the full Zstandard guide →

More comparisons