In today’s word where technology is accessible for more than half of the population, all types of data are being created and transmitted than ever before. YouTube only has over 700,000 hours worth of video being uploaded every day. To put this into perspective, it would take you close to 82 years to watch the amount of videos uploaded to YouTube in only an hour.
Because of this, it’s a major concern for storage space and bandwidth. This is where compressions comes into play to reduce how much data is being transmitted and stored. This blog is going to be a small crash course on 2 ways we compress data today, Lossless Compression and Lossy Compression.
Lossless compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data.
— Wikipedia’s definition of Lossless Compression
The thing you need to understand that it doesn’t affect the original data!
Can you tell the difference? To the naked eyes these 2 images are the same, however when you zoom into the pixels itself they will be different. The original picture will have more colors than the Lossless picture. This is because on how Run-length encoding (A form of Lossless Compression) works.
Instead of copying slightly different shades of red, it will copy a color that occurs the most and use it for a small sequence. This is really great for the most of us, but for graphic artists and photographers it’s a nightmare. Because you’re not receiving the most define image when it’s compressed. So that’s why we have TIFF files, for storing raster graphics which are much more define.
Lossless Compression file types include:
- GIF (That’s why GIFs has that grainy look!)
Lossy compression or irreversible compression is the class of data encoding methods that uses inexact approximations and partial data discarding to represent the content
— Wikipedia’s definition of Lossy Compression
You may ask yourself, what’s the difference between Lossless and Lossy? Well the key different is that Lossy alters the original data. Eliminating certain pieces of small data (bytes) that are considered undetectable.
A perfect example is audio files, checkout this video showing you a MP3 vs a WAV snippet from the song “Take Me To Church”! https://www.youtube.com/watch?v=FSyJHw6ipbg&t=84s
Unless you have a software that looks at the audio waves or special speakers, the 2 snippet are perfectly identical. However, the MP3 file is significantly smaller than the WAV file. This is because the lossy compression gets rig of certain frequencies that human ears can not detect.
For the majority of us this is great, because we can store more songs and can’t even tell the difference! But for musicians and music producers it’s not the best option!
Lossy Compression file types include:
For your average person, compressions are amazing because we can store more data without specially changing the original. However, when it comes to entire roles it’s the last thing they want to use.