HOME

TheInfoList



OR:

Lempel–Ziv–Stac (LZS, or Stac compression or Stacker compression) is a
lossless data compression Lossless compression is a class of data compression that allows the original data to be perfectly reconstructed from the compressed data with no loss of information. Lossless compression is possible because most real-world data exhibits statistic ...
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing ...
that uses a combination of the
LZ77 LZ77 and LZ78 are the two lossless data compression algorithms published in papers by Abraham Lempel and Jacob Ziv in 1977 and 1978. They are also known as LZ1 and LZ2 respectively. These two algorithms form the basis for many variations includin ...
sliding-window compression algorithm and fixed
Huffman coding In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression. The process of finding or using such a code proceeds by means of Huffman coding, an algo ...
. It was originally developed by Stac Electronics for tape compression, and subsequently adapted for
hard disk compression A disk compression software utility increases the amount of information that can be stored on a hard disk drive of given size. Unlike a file compression utility, which compresses only specified files—and which requires the user to designate ...
and sold as the
Stacker A stacker is a large machine used in bulk material handling. Its function is to pile bulk material such as limestone, ores and cereals on to a stockpile. A reclaimer can be used to recover the material. Gold dredges in Alaska had a stacke ...
disk compression software. It was later specified as a compression algorithm for various network protocols. LZS is specified in the
Cisco IOS The Internetworking Operating System (IOS) is a family of proprietary network operating systems used on several router and network switch models manufactured by Cisco Systems. The system is a package of routing, switching, internetworking, and ...
stack.


Standards

LZS compression is standardized as an INCITS (previously ANSI) standard. LZS compression is specified for various Internet protocols: * – ''PPP LZS-DCP Compression Protocol (LZS-DCP)'' * – ''PPP Stac LZS Compression Protocol'' * – ''IP Payload Compression Using LZS'' * – ''Transport Layer Security (TLS) Protocol Compression Using Lempel-Ziv-Stac (LZS)''


Algorithm

LZS compression and decompression uses an
LZ77 LZ77 and LZ78 are the two lossless data compression algorithms published in papers by Abraham Lempel and Jacob Ziv in 1977 and 1978. They are also known as LZ1 and LZ2 respectively. These two algorithms form the basis for many variations includin ...
type algorithm. It uses the last 2 KB of uncompressed data as a sliding-window dictionary. An LZS compressor looks for matches between the data to be compressed and the last 2 KB of data. If it finds a match, it encodes an offset/length reference to the dictionary. If no match is found, the next data byte is encoded as a "literal" byte. The compressed data stream ends with an end-marker.


Compressed data format

Data is encoded into a stream of variable-bit-width tokens.


Literal byte

A literal byte is encoded as a '0' bit followed by the 8 bits of the byte.


Offset/length reference

An offset/length reference is encoded as a '1' bit followed by the encoded offset, followed by the encoded length. One exceptional encoding is an end marker, described below. An offset can have a minimum value of 1 and a maximum value of 2047. A value of 1 refers to the most recent byte in the history buffer, immediately preceding the next data byte to be processed. An offset is encoded as: * If the offset is less than 128: a '1' bit followed by a 7-bit offset value. * If the offset is greater than or equal to 128: a '0' bit followed by an 11-bit offset value. A length is encoded as:


End marker

An end marker is encoded as the 9-bit token 110000000. Following the end marker, 0 to 7 extra '0' bits are appended as needed, to pad the stream to the next byte boundary.


Patents

Stac Electronics' spin-off
Hifn Hifn (styled ''Hi/fn'') was a semiconductor manufacturer founded in Carlsbad, California, in 1996 as a corporate spin-off from Stac Electronics. The company was later headquartered in Los Gatos, California, and had offices in North America, Europ ...
has held several patents for LZS compression. These patents lapsed due to non-payment of fees and attempts to reinstate them in 2007 failed. In 1993–94, Stac Electronics successfully
sued - A lawsuit is a proceeding by a party or parties against another in the civil court of law. The archaic term "suit in law" is found in only a small number of laws still in effect today. The term "lawsuit" is used in reference to a civil acti ...
Microsoft for infringement of LZS patents in the DoubleSpace disk compression program included with MS-DOS 6.0.Complaint for patent infringement and Demand for jury trial
by Stac Electronics v Microsoft Corporation


See also

*
LZ77 LZ77 and LZ78 are the two lossless data compression algorithms published in papers by Abraham Lempel and Jacob Ziv in 1977 and 1978. They are also known as LZ1 and LZ2 respectively. These two algorithms form the basis for many variations includin ...
* MPPC


References

{{DEFAULTSORT:Lempel-Ziv-Stac Lossless compression algorithms