|
LZMA, short for Lempel-Ziv modified algorithm, 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:
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. However, there are two working ports to Unix-like platforms: p7zip (http://sourceforge.net/projects/p7zip/) is a more-or-less complete port of the 7z and 7za command-line versions of 7-zip. LZMA Unix Port (http://martinus.geekisp.com/rublog.cgi/Projects/LZMA) is a port of only the LZMA code to create a stream based compression utility similar to gzip. This tool is not an archiving utility and so its format is a plain one. 7-zip uses a more flexible archive format, 7z, and thus neither tool can use the files the other creates, at least for now.
There is a Mac OS X port of 7zip called Compress (not related with the old archiving format), but it is buggy at best.
The PyLZMA Python Wrapper (http://www.joachim-bauch.de/projects/python/pylzma) supports compression and decompression on the Windows and Linux platforms.
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 (http://www.usr.com/support/s-gpl-code.asp), 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 (it's a read-only filesystem like ISO9660, the standard compact disc filesystem). Modified cramfs tools (http://babel.ls.fi.upm.es/~aacosta/twiki/bin/view/Projects/CramfsPatches) are aviable to deal with such LZMA CRAMFS filesystem images.
External links
|