SDK · v26.02
LZMA SDK
The documentation, samples, header files, libraries, and tools you need to develop applications that use LZMA compression — the same method that powers the 7z format by default.
Public domain
As of version 4.62, the LZMA SDK is public domain: "Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original LZMA SDK code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means."
What's inside
Languages
- C
- C++
- C#
- Java
Windows binaries ship for x86, x64, and arm64.
Source & examples
- C++ LZMA encoder/decoder source
- C++ .7z compression/decompression (reduced)
- ANSI-C source for LZMA / LZMA2 / XZ
- ANSI-C 7z decompression example
Tools
lzma.exe— standalone compressor7zr.exe— reduced 7-Zip- SFX modules for self-extracting archives and installers
Where it's used
Suitable for embedded applications thanks to a small decompression footprint — ROM and firmware compression are common uses, alongside general-purpose archiving.
Speed and footprint
| Metric | Figure |
|---|---|
| Compression speed | 2–8 MB/s on a 4 GHz CPU (2 threads) |
| Decompression speed | 30–100 MB/s on a 4 GHz CPU, or 5–15 MB/s on a 1 GHz RISC CPU |
| Decompression memory | 8–32 KB, plus the dictionary size |
| Decompression code size | 2–8 KB |
Where the name comes from
LZMA originally stood for Lempel-Ziv-Markov chain-Arithmetic coding. In the final version, arithmetic coding was replaced by range coding — the name stuck anyway.
See the real page on 7-zip.org/sdk.html.