Lossless compression is a type of media compression that shrinks a file's size without any quality loss. A file shrunk with lossless compression is indistinguishable from the original.
Lossless media formats save storage space while maintaining the full fidelity of the original file. For example, an image saved as a lossless PNG preserves every pixel of the original. A lossless FLAC audio file includes waveforms identical to the original audio sample. Professional photo and video editors often choose lossless formats to prevent artifacting and maintain as much quality as possible.
How Lossless Compression Works
Unlike lossy compression, which discards certain parts of a file to create a smaller and lower-fidelity version of the original, lossless compression saves file space by rewriting the data more efficiently. Many lossless algorithms look through a file for any pattern that repeats, then save that pattern and reference it later instead of writing the same data multiple times. Many lossless media compression algorithms are similar to ones used for compressing documents and other files. For example, PNG compression is a derivative of the same algorithm that ZIP files use.
NOTE: Lossless compression usually cannot reduce a file's size by as much as a lossy compression algorithm can. FLAC audio compression can often achieve a 40-50% reduction in file size, while a lossy MP3 file can reduce the original file size by 90%.