Introduction
LZMA is the compression method Igor Pavlov created for
7-Zip’s 7z archives.
An .lzma file is a single file compressed with it, in the simple container
from his LZMA SDK, known as LZMA_Alone. LZMA Utils made it popular on Linux for a few
years, but the container has no magic number and no integrity check, so it was replaced
by xz from 2009. Old .tar.lzma files and
some firmware images still use it.
Structure
Numbers are little-endian.
0Properties lc, lp and pb packed into one byte as (pb × 5 + lp) × 9 + lc1 byte1Dictionary size4 bytes5Uncompressed size or all ones if unknown8 bytes13LZMA datathe rest
With the usual settings (lc 3, lp 0, pb 2) the first byte is 5D, which is
the nearest thing the format has to a signature. When the size is unknown, the data ends
with an end marker instead.
Links
Software
Developers
Reference
- The LZMA specification,
lzma-specification.txt, in the LZMA SDK