Main page
   Data encoding
   Communications channel
   Protocols
   Errors
   Error correction

The Lempel-Ziv algorithm

The key insight of the method is that it is possible to automatically build a dictionary of previously seen strings in the text being compressed. The dictionary does not have to be transmitted with the compressed text, since the decompressor can build it the same way the compressor does, and if coded correctly, will have exactly the same strings that the compressor dictionary had at the same point in the text.

The dictionary starts off with 256 entries, one for each possible character (single byte string). Every time a string not already in the dictionary is seen, a longer string consisting of that string appended with with the single character following it in the text, is stored in the dictionary.

The output consists of integer indices into the dictionary. These initially are 9 bits each, and as the dictionary grows, can increase to up to 16 bits. A special symbol is reserved for "flush the dictionary" which takes the dictionary back to the original 256 entries, and 9 bit indices. This is useful if compressing a text which has variable characteristics, since a dictionary of early material is not of much use later in the text.


   back

interactive world map; Interactive world map; ïîðíî âçðîñëûõ; interactive map; interactive world maps; Öåíû íà Elektra Sixties T3 2GR â Óêðàèíå; inspirational; âèçà ñøà; uk job; Guenstig: Sweatshirtjacken