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 an approximation of the original data to be reconstructed, in exchange for better compression rates.
Lossless compression reduces a file's size with no loss of quality. This seemingly magical method of reducing file sizes can be applied to both image and audio files. While JPEGs and MP3s use lossy compression, newer compression algorithms, such as JPEG 2000 and FLAC compression, can be used to create lossless compressed files.
Lossless compression basically rewrites the data of the original file in a more efficient way. However, because no quality is lost, the resulting files are typically much larger than image and audio files compressed with lossy compression. For example, a file compressed using lossy compression may be one tenth the size of the original, while lossless compression is unlikely to produce a file smaller than half of the original size.