Information Theory and Coding Basics
Which of the following correctly describes the idea of the LZ77 method used in ZIP, gzip and similar tools?
- AIt assigns short codewords to symbols with a high probability of occurring and long codewords to those with a low probability
- BIt discards components that are hard for human eyes or ears to notice to make the data smaller
- CIt replaces a string identical to one that appeared earlier with a pair of the distance back to that position and the length
Show answer and explanation
Answer: C. It replaces a string identical to one that appeared earlier with a pair of the distance back to that position and the length
The LZ77 method uses the data already processed like a dictionary, and when the same string appears again it replaces it with a pair of distance and length, "so many characters back, for so many characters". It can shrink highly repetitive data without knowing the symbol probabilities in advance, and it is lossless compression that restores the original data exactly. The Deflate method of ZIP and gzip further encodes the output of LZ77 with Huffman codes.
- A. This is the idea of coding that uses symbol probabilities, such as Huffman coding.
- B. This is the idea of lossy compression such as JPEG and MP3; LZ77 is lossless compression.
- C. Correct. Repeated strings are represented by references to their earlier occurrences.
Continue: 9 more Information Theory and Coding Basics questions