Lossless data compression includes a class of algorithms that allow the reconstruction of exact original data from the compressed data. Lossless compression formats resemble zip compressor but are tuned for audio and provide same audio quality of input file in the output file. This differs from lossy data compression, which allows reconstruction of only an approximation of the original data in exchange for better compression rates.
Lossless data compression finds applications in the popular Zip file format and the Unix tool gzip. It also functions as a component within lossy data compression technologies. Generally, the technique is used when the original and the decompressed data are intended to be identical. Image file formats like PNG or GIF use lossless compression only but other formats like TIFF and MNG may use either lossless or lossy methods.
Lossless compression programs generate a statistical model for the input data and use this model to map input data to bit sequences so that probable data produce shorter output than improbable data. Huffman coding and arithmetic coding are the primary encoding algorithms used to produce bit sequences. Lossless compression methods are categorized on the basis of the type of data they are designed to compress. The techniques used for text work reasonably well for indexed images too.
Since no lossless compression algorithm can efficiently compress all possible data, many different algorithms are designed for different kinds of redundancies the uncompressed data are likely to have. Some of the most common lossless compression algorithms include run-length encoding, LZW, Deflate, Waveform audio format, Apple Lossless, ATRAC Advanced Lossless, MLP, Monkey’s Audio, TTA and WMA Lossless. Lossless data compression algorithms, however, do not guarantee compression for all input data sets.