|
@@ -1,36 +1,83 @@
|
|
|
# XZ Utils
|
|
# XZ Utils
|
|
|
|
|
|
|
|
-XZ Utils is a high-performance data compression library and command-line tools that provide the XZ format, which offers significantly better compression ratios than traditional formats like gzip and bzip2.
|
|
|
|
|
|
|
+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
|
|
## Features
|
|
|
|
|
|
|
|
-- **High Compression Ratio**: Achieves excellent compression ratios, typically 30-50% better than gzip
|
|
|
|
|
-- **Multiple Formats**: Supports both the legacy .lzma format and the modern .xz format
|
|
|
|
|
-- **Integrity Checking**: Built-in CRC32, CRC64, and SHA-256 integrity checks
|
|
|
|
|
-- **Multi-threading**: Utilizes multiple CPU cores for faster compression/decompression
|
|
|
|
|
-- **Small Memory Footprint**: Efficient implementation suitable for embedded systems
|
|
|
|
|
|
|
+- 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
|
|
|
|
|
|
|
|
-## Included Tools
|
|
|
|
|
|
|
+## Main Components
|
|
|
|
|
|
|
|
-- **xz**: Main compression/decompression tool with advanced features
|
|
|
|
|
-- **xzdec**: Small decompressor for memory-constrained environments
|
|
|
|
|
-- **lzmainfo**: Displays information about .lzma files
|
|
|
|
|
-- **lzmadec**: Decompresses legacy .lzma format files
|
|
|
|
|
-- **Scripts**: Helper scripts for compressed file operations (xzgrep, xzdiff, xzmore, etc.)
|
|
|
|
|
|
|
+- **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
|
|
|
|
|
|
|
|
-## Applications
|
|
|
|
|
|
|
+## Usage Examples
|
|
|
|
|
|
|
|
-XZ Utils is widely used in:
|
|
|
|
|
-- System backup and archiving tools
|
|
|
|
|
-- Software distribution and packaging
|
|
|
|
|
-- Embedded systems and firmware
|
|
|
|
|
-- Data compression for cloud storage and transmission
|
|
|
|
|
|
|
+### Basic Compression
|
|
|
|
|
+```bash
|
|
|
|
|
+# Compress a file
|
|
|
|
|
+xz file.txt
|
|
|
|
|
|
|
|
-## License
|
|
|
|
|
|
|
+# Compress with maximum compression
|
|
|
|
|
+xz -9 file.txt
|
|
|
|
|
|
|
|
-XZ Utils is released under multiple free software licenses:
|
|
|
|
|
-- BSD Zero Clause License (0BSD) for most components
|
|
|
|
|
-- GNU GPL v2/v3 for some components
|
|
|
|
|
-- GNU LGPL v2.1 for getopt_long functionality in scripts
|
|
|
|
|
|
|
+# Compress keeping the original file
|
|
|
|
|
+xz -k file.txt
|
|
|
|
|
+```
|
|
|
|
|
|
|
|
-This package provides the complete XZ Utils suite including libraries, command-line tools, and development headers for integration with other applications.
|
|
|
|
|
|
|
+### 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/
|