You may already know that computers and smart devices use compression to save disk space and bandwidth, either through lossy compression or lossless compression. Both types of compression have their place, but what exactly separates them and which is better?
Lossy compression makes files smaller
Lossy compression discards as much data as possible in an attempt to keep file sizes as small as possible. This is accomplished by targeting data that is considered less noticeable, so that the file itself still looks very much like the original. The more compressed a file is, the more quality will be affected.
Two good examples of lossy compression are JPEG images and MP3 audio files . A highly compressed JPEG (example below) will display visual artifacts , loss of clarity and detail, possible color banding, and even color changes. You may see outlines around parts of the image that were not in the original.
In terms of audio, a highly compressed MP3 file sounds noticeably worse than an uncompressed original, especially at low and high frequencies. Bass lines and cymbals can sound muffled or glistening, and overall audio clarity is reduced even in the mid-range.
Not all JPEG files are a blurry mess, and not all MP3s sound like they’ve been downloaded from Napster. The level of compression used can make a big difference to the quality of the file. A slightly compressed 320 kbps JPEG or MP3 file will be difficult to distinguish from an uncompressed original in most cases.
Lossless compression favors quality over size
Lossless compression requires that the data is not discarded, which in turn uses more space or bandwidth. Unlike lossy compression, lossless compression does not result in data degradation, and the decompressed data is identical to the uncompressed original.
Some examples of lossless compression include the FLAC and ALAC audio codecs , ZIP files and PNG images . Audio files using lossless compression are approximately half the size of the uncompressed original at the same sample rate. Many streaming services now offer lossless streaming, including Apple Music , Tidal, Deezer and Spotify’s new hi-fi level.
ZIP files are often used to compress software, which cannot undergo any lossy compression that could cause data to be dropped (and the software would stop working). PNG image files rely exclusively on lossless compression, with services such as TinyPNG in Instead of squeezing images to fit a much smaller color palette to reduce file size.
Both with loss and without loss have their place
For archival purposes, lossless compression is the key. Is not possible to rebuild a lossless version of a file when it has been compressed with loss.
If file size or bandwidth is a concern, lossy compression makes a lot more sense. For example, if you want to download some music to your smartphone for offline listening, using lossy codecs like AAC will allow you to store much more music at the cost of little impact on quality.
And that’s before considering that everyone best wireless headphones like Apple’s AirPods Pro rely on lossy compression to bring your device’s audio to your ears in the first place.