What’s lossy compression?

Print anything with Printful



Lossy compression sacrifices some data to reduce file size, while lossless compression rearranges data without losing any. Lossless compression is useful for preserving all data, while lossy compression is ideal for reducing file size. JPEG and GIF are examples of lossy compression techniques that can significantly reduce file size without noticeable loss in quality.

Lossy compression is a type of data compression in which the actual information is lost. This means that after reconstructing the data from the available information, you end up with something less than the original file. In general, the goal is to use lossy compression in such a way that there isn’t much observable loss in the final product, saving massively on file size over lossless compression.

Lossless compression is a form of compression in which data files are split into different chunks and rearranged to optimize them. This type of compression very rarely saves much space, but it’s great for transporting huge files by breaking them into easier-to-handle chunks. Lossless compression is used when every bit of data is needed in the final product, often during the transmission of a file to a designer. In the case of images, lossless compression allows the designer to be sure that all the data they want to change will be present, allowing them to create a final product before compressing the file further using lossy compression. This also applies to audio files, where an audio mixer may need additional information, such as separate channels, that an end user won’t require.

The easiest way to understand lossy compression is to give an example, such as what happens when you copy a RAW data file from a digital camera to a computer. This RAW file can be up to 30MB and include all sorts of color channel data, information about how the photo was taken, and a wealth of data for each individual pixel. Having all this information in a lossless format means that when you import it into a photo editing program with the right capabilities, all of these things can be changed. It also means that the color fidelity for each pixel is as high as possible.

At some point, though, you’ll probably want to do something other than photo editing. You might want to email it to a friend or upload it to an online site. You may just want to store it and a hundred other images on your computer and at 30MB in size each a hundred images would take up a whopping 3GB of space. So to deal with this you will compress the photo. Some forms of lossless compression may be able to reduce the file size slightly, without losing photo fidelity, but you’ll still end up with huge images in the end.

This is where a lossless compression technique, such as JPEG or GIF, comes into play. Using one of these compression techniques, an algorithm takes control of your photo and finds the shortcuts to describe it to the computer. Largely equal blocks of color are mapped equally, substantially reducing file sizes and often losing nothing that can be perceived by the human eye.
At extremely high levels, a 30MB lossless image can be compressed down to about 3MB and still look nearly identical to the human eye. The same goes for other lossy compression models, such as MP3 for audio or WMV for video. Of course, if the file size is reduced too much, the shortcuts taken end up making the resulting image, audio file or video look a bit different from the original and the final result is of significantly lower quality.




Protect your devices with Threat Protection by NordVPN


Skip to content