Lzip Compressed
An .lz file is a Lzip compressed archive designed for long-term data preservation using LZMA compression with integrity safeguards. FileDex provides reference information only.
Lzip decompression requires the lzip library not available in browser WASM.
Common questions
How do I open or decompress an .lz file?
Install lzip from your package manager (apt install lzip, brew install lzip, or download Windows binaries from the GNU lzip page). Run lzip -d archive.lz to decompress. Alternatively, 7-Zip version 23.01 and later can extract .lz files on Windows.
What is the difference between .lz and .xz?
Both use LZMA compression and achieve similar ratios. Lzip prioritizes archival integrity with per-member CRC-32 and size fields in a simple trailer, enabling data recovery via lziprecover. Xz uses a more complex container format with SHA-256 checksums and filter chains, offering broader tool support but lacking lzip's multi-copy repair capability.
Can lzip compress faster using multiple CPU cores?
Yes. The plzip tool parallelizes both compression and decompression across CPU cores by processing multiple lzip members simultaneously. On an 8-core machine, plzip typically achieves 5-7x speedup over single-threaded lzip. The output is a standard .lz file readable by any lzip-compatible tool.
What makes .LZ special
Lzip is a lossless compression format created by Antonio Diaz Diaz in 2008, built on the LZMA algorithm with a deliberate focus on archival durability over raw speed. Lzip was specifically designed for long-term archival — where xz prioritizes compatibility with legacy LZMA tools, lzip prioritizes data integrity by including redundant size and CRC fields that enable the lziprecover tool to salvage data from partially corrupted archives, even reconstructing lost bytes via a known-good copy.
Continue reading — full technical deep dive
File Format Design
Every lzip member starts with the four-byte magic number LZIP (0x4C 0x5A 0x49 0x50) followed by a single version byte (currently 1). The version byte is followed by a dictionary size encoded in a compact single-byte format. After the LZMA-compressed data stream, a 20-byte trailer stores the CRC-32 of the original data, the original data size (8 bytes), and the member size (8 bytes). This trailer is the critical differentiator from xz — it provides an independent check that the decompressed output is the correct length and matches the expected checksum, without relying on the LZMA stream's internal consistency.
Multi-Member Recovery
Lzip files can contain multiple concatenated members, each with its own header, data stream, and trailer. This is not merely a convenience feature. If one member becomes corrupted, the remaining members remain independently decompressible. The lziprecover utility exploits this structure in three ways: it can split a multi-member file into individual members for selective recovery, it can merge two damaged copies of the same file to reconstruct a clean version, and it can remove corrupted members while preserving the rest.
Parallel Compression
The plzip tool distributes compression across multiple CPU cores by splitting input into members and compressing each member on a separate thread. Because lzip's multi-member format is part of the specification, the resulting file is a standard .lz archive — any lzip-compatible decompressor can read it. Decompression with plzip is also parallelized across member boundaries.
Practical Tradeoffs
Lzip achieves compression ratios comparable to xz, typically within 1-2% on most data types. Compression speed is similar to xz at equivalent dictionary sizes. The format's overhead per member is 36 bytes (16-byte header + 20-byte trailer), negligible for all but the tiniest files. The primary cost is limited tool support compared to gzip or xz — not all Linux distributions include lzip by default, and Windows support requires third-party builds.
Technical reference
- MIME Type
application/x-lzip- Magic Bytes
4C 5A 49 50LZIP signature.- Developer
- Antonio Diaz Diaz
- Year Introduced
- 2008
- Open Standard
- Yes
LZIP signature.
Binary Structure
Lzip files begin with magic bytes 4C 5A 49 50 (LZIP) followed by a version byte (0x01 for current format) and a dictionary size byte. The LZMA-compressed data stream follows immediately. Each member ends with a 20-byte trailer: CRC-32 of original data (4 bytes), original data size (8 bytes little-endian), and member size (8 bytes little-endian). Multiple members can be concatenated, each with its own complete header-data-trailer sequence.
Attack Vectors
- Decompression bombs — a small .lz file can expand to an extremely large output, exhausting disk space
- Crafted LZMA streams can trigger excessive memory allocation in decompressors configured with large dictionary sizes
Mitigation: FileDex does not open, execute, or parse these files. Reference page only.