Redirected from Data compression/LZ77 78
The LZ77 algorithm works by keeping a history window of the most recently seen data and comparing the current data being encoded with the data in the history window. What is actually placed into the compressed stream are references to the position in the history window, and the length of the match. If a match cannot be found the character itself is simply encoded into the stream after being flagged as a literal. As of 2002, the most popular LZ77 algorithm is called DEFLATE; it combines LZ77 with Huffman coding.
While the LZ77 algorithm works on past data, the LZ78 algorithm attempts to work on future data. It does this by forward scanning the input buffer and matching it against a dictionary it maintains. It will scan into the buffer until it cannot find a match in the dictionary. At this point it will output the location of the word in the dictionary, if one is available, the match length and the character that caused a match failure. The resulting word is then added to the dictionary.
LZ78 never became as popular as LZ77 because for the first few decades after it was introduced, LZ78 was somewhat of a patent minefield in the United States, while LZ77 is not patented.
Search Encyclopedia
|
Featured Article
|