- Lempel-Ziv-Markov chain algorithm
The Lempel-Ziv-Markov chain-Algorithm (LZMA) is an
algorithm used to performdata compression . It has been under development since 1998 [The SDK history file states that it was in development from 1996, and first used in7-zip 2001-08-30. Aside from some unreferenced comments about 1998, the algorithm appears to have been unpublished before its use in7-zip .] and is used in the7z format of the7-Zip archiver. This algorithm uses a dictionary compression scheme somewhat similar toLZ77 and features a high compression ratio (generally higher thanbzip2 [cite web |url=http://tukaani.org/lzma/benchmarks |title=A Quick Benchmark: Gzip vs. Bzip2 vs. LZMA |accessdate=2008-09-02 |last=Collin |first=Lasse |date=2005-05-31 |work= [http://tukaani.org/ The Tukaani Project] ] [cite web |url=http://blog.i-no.de//archives/2008/05/08/index.html#e2008-05-08T16_35_13.txt |title=Gzip, Bzip2 and Lzma compared |accessdate=2008-09-02 |last=Klausmann |first=Tobias |date=2008-05-08 |work= [http://blog.i-no.de/ Blog of an Alpha animal] ] ) and a variable compression-dictionary size (up to 4 GB).Overview of the LZMA format [http://www.7-zip.org/7z.html 7z Format] ]Overview
The LZMA uses an improved
LZ77 compression algorithm, backed by a range encoder.Streams for data, repeated-sequence size and repeated-sequence location seem to be compressed separately.Fact|date=July 2008
7-Zip reference implementation
The
reference implementation of LZMA is included as part of the7z and7-Zip suite of tools.Source code is distributed under the terms of theGNU LGPL license with a special exception for linked binaries. The special exception allows redistribution of binaries linked to unmodified LZMA to be free of any LGPL requirements (e.g., they do not need to allowreverse engineering or binary modifications.)The reference
open source LZMA compression library is written inC++ and 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.As of version 4.58 (beta) of LZMA SDK, there is also ANSI C reference implementation of LZMA compression and decompression routines available as well.
The 7-Zip implementation uses several variants of
hash chain s,binary tree s andPatricia trie s as the basis for its dictionary search algorithm.Decompression-only code for LZMA generally compiles to around 5kB and the amount of RAM required during decompression is principally determined by the size of the
sliding window used during compression. Small code size and relatively low memory overhead, particularly with smaller dictionary lengths, make the LZMA decompression algorithm well-suited to embedded applications.Algorithm
Paul Sladen summarizes the algorithm:
Users
Software that uses or supports LZMA:
*
cramfs andSquashFS , with applied patches
*Inno Setup
*Nullsoft Scriptable Install System
*Peazip , GUI frontend to command-line 7z and POSIX 7z binaries
*UPX , from version 2.92 (beta) and above, features optional LZMA compression
* TheRPM Package Manager , from version 4.6 onwards [cite web
url=http://fedoraproject.org/wiki/Features/RPM4.6
title=Features/RPM4.6
publisher=Red Hat, Inc.
accessdate=2008-08-30]
*dpkg , from version 1.13.35.
* GNU Tar, from version 1.20 (using the --lzma switch or --auto-compress (-a) with the archive's filename ending in .tar.lzma or .tlz).
*PECompact
*WinZip Notes
External links
* [http://www.7-zip.org/ 7-Zip] Official homepage.
* [http://p7zip.sourceforge.net/ p7zip] 7-Zip homepage forLinux .
* [http://www.unet.univie.ac.at/~a0503736/php/drdoswiki/index.php?n=Main.Compress Data compression, Compressors & Archivers]
* [http://tukaani.org/lzma/ LZMA Utils] , command line compression program similar togzip andbzip2
* [http://pypi.python.org/pypi/pyliblzma PylibLZMA] , a python interface using the liblzma API.
Wikimedia Foundation. 2010.