Lossless data compression is a class of data compression algorithms that allows the exact original data to be reconstructed from the compressed data. The term lossless is in contrast to lossy data compression, which only allows constructing an approximation of the original data, in exchange for better compression rates. Lossless data compression is used in many applications. For example, it is used in the ZIP file format and in the Unix tool gzip.