LZMA
From open-encyclopedia.com - the free encyclopedia.
LZMA is a data compression algorithm, used in the 7z format of the 7-Zip archiver. It uses a dictionary compression scheme somewhat similar to LZ77 and features a high compression ratio (generally higher than Bzip2) and a variable compression-dictionary size (up to 4 GB).
The reference implementation, which is available under the GNU LGPL license, has the following properties:
- Compression speed: approximately 1 MB per second on a 2 GHz CPU
- Decompression speed: between 10 and 20 MB per second on a 2 GHz CPU
- Support for multi-threading and for the Pentium 4 microprocessor's hyper-threading feature
The decompression code for LZMA is around 5KB and the dynamic memory needed during decompression is modest (it depends on the dictionary size). These features make the decompression phase of the algorithm well-suited to embedded applications.
Unfortunately, the use of Microsoft Windows specific features is deeply buried in the source code, which makes it very difficult to create a Unix compatible version. There are two working ports: p7zip is a more-or-less complete port of the 7z and 7za command-line versions of 7-zip. LZMA Unix Port is a port of only the LZMA code to create a stream based compression utility similar to gzip. This tool isn't an archiving utility and so its format is a plain one, not the 7z that 7-zip uses, and cannot be decompressed (for now) with 7-zip.
The PyLZMA Python Wrapper supports compression and decompression on both platforms (Windows and Linux).
Some embedded router-dsl-wireless devices (like the US Robotics 9105 and 9106) run a modified version of Linux (source code available on USR website, apparently the source comes from Broadcom) which boots on a filesystem which is basically CRAMFS, modified to use LZMA compression instead of ZLIB. They seem to use a thick layer of glue code around the reference decompression code, and no tools are available to create such CRAMFS images (it's a read-only filesystem like ISO9660).