XZ Compressed (LZMA2)
XZ is a compression format that uses the LZMA2 algorithm to achieve excellent compression ratios. It is the default compression for Linux kernel tarballs, many package managers, and is favored when minimizing download size matters more than compression speed.
MIME Type
application/x-xz
Type
Binary
Compression
Lossless
Advantages
- + Excellent compression ratios — often the smallest output
- + Integrity checks built into the format
- + Multi-threaded compression and block-level random access
Disadvantages
- − Very slow compression speed compared to gzip or Zstandard
- − High memory usage during compression
- − Not as widely supported on Windows as ZIP
When to Use .XZ
Use XZ for distributing software, kernel sources, and backups where the smallest possible file size is the priority.
Technical Details
XZ uses LZMA2 compression within a stream/block container that supports integrity checks (CRC-32, CRC-64, SHA-256) and random access to blocks. The format allows multi-threaded decompression of independent blocks.
History
The XZ format was created in 2009 by Lasse Collin as the successor to LZMA-only compression. It was quickly adopted by major Linux distributions for package compression (Fedora, Arch, Debian).