Compression: techniques
- Lossless techniques allow perfect reconstruction of the original from the compressed form. Hence they are noiseless, not introducing any noise. They need only retain the entropy, that is the inherent pattern or content, that is left when all redundant data is removed.
- Huffman coding usually leads to a variable length bit pattern for each character in the data's alphabet. (The alphabet is usually of letters, but could be of unique words or numbers.) The object is to have the shortest bit string for the most frequent characters.
- Arithmetic coding divides the [0,1] range into regions based on frequency, using shorter decimal numbers for more frequent values (larger parts of the range). It is better for adaptive situations than Huffman coding.
- Run-length coding handles sequences of the same data value by replacing them with a count of the number of repetitions.
- Lossy techniques yield more compression than lossless methods, but may introduce noise, so the original cannot be perfectly reconstructed. The object is to minimize perceived differences from the original, for whatever compression ratio is required.
- Predictive techniques use the fact that values in a multimedia stream tend to change slowly, so one can predict latter values from former ones, and only store differences from predicted values. Thus, one can store the vectors that describe motion of blocks of pixels, along with differences from values expected as a result of such translations.
- Frequency-oriented techniques exploit the fact that human senses have greater sensitivity to lower frequency signals. Transforms map from the time domain to the frequency domain, so that more attention can be paid to compressing lower frequency data. Subband coding has a similar effect, but uses filters to separate out data of differing frequencies.
- Importance coding uses more bits for more important information. Importance can be determined with filters, by subsampling colors relative to luminance, or during quantization (either 1-D with scalers or 2-D with vectors) where a codebook of the most common patterns is produced through extensive analysis. Bits are allocated according to importance.
- Hybrid coding, such as MPEG for digital video (and audio) or px64 for videoconferencing, uses several comprssion methods to achieve the greatest possible compression. In particular, usually predictive coding occurs over time, frequency oriented coding for each image, and lossless coding finally removes any remaining redundancy.