# XZ Utils XZ Utils is free general-purpose data compression software with high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils. ## Features - High compression ratio - Fast decompression - Small memory requirements for decompression - Multi-threading support for compression - Integrity checking (CRC32, CRC64, SHA-256) - Easy-to-use command line interface - API for integration with applications ## Main Components - **xz** - The primary compression/decompression tool - **unxz** - Decompression tool (symlink to xz) - **xzcat** - Decompresses to standard output (symlink to xz) - **lzma** - Compatibility tool for LZMA format (symlink to xz) - **unlzma** - Decompression tool for LZMA format (symlink to xz) - **lzcat** - Decompresses LZMA to standard output (symlink to xz) - **xzdec** - Small decompressor for embedded use - **lzmadec** - Small LZMA decompressor for embedded use - **lzmainfo** - Shows information stored in LZMA files - **liblzma** - Compression library with C API ## Usage Examples ### Basic Compression ```bash # Compress a file xz file.txt # Compress with maximum compression xz -9 file.txt # Compress keeping the original file xz -k file.txt ``` ### Basic Decompression ```bash # Decompress a file unxz file.txt.xz # Decompress to standard output xzcat file.txt.xz ``` ### Advanced Options ```bash # Compress with custom dictionary size xz --dict-size=64MiB file.txt # Compress with multiple threads xz -T4 file.txt # Test integrity of compressed file xz -t file.txt.xz ``` ## Library Integration The liblzma library provides a C API for applications to integrate XZ compression capabilities. Header files are installed in `${PREFIX}/include/lzma/` and the library can be linked with `-llzma`. ## Licenses XZ Utils is distributed under multiple libre licenses: - BSD Zero Clause License (0BSD) - GNU Lesser General Public License v2.1 (LGPLv2.1) - GNU General Public License v2 (GPLv2) - GNU General Public License v3 (GPLv3) You can choose to use the software under any of these licenses. ## Documentation Comprehensive man pages are available for all commands and the library API. Additional documentation and examples can be found in `${PREFIX}/share/doc/xz/`. ## More Information For more details, visit the official website: https://tukaani.org/xz/