Compression

What is it, How does it work, and why do we need it?

What is Compression?

Compression is making a file smaller by removing/recreating unnecessary data, it is used in every day life. If you watch a video on YouTube that video's file has been compressed so that it will load quickly. In ".MP3" files, the data has been reduced to one tenth of its original size.

What are the types of compression?

There are two types of compression: Lossy and Lossless.


Lossy is where data is simply removed from the file. Data that is less likely to be noticed by human senses is normally removed. Lossy can lead to considerable Change in quality with certain files.


Lossless is where unnecessary data or duplicate data is recorded, removed and the recreated at the receiving end. This leads to no change in quality, and the compressed data cam be retrieved.

Why are files compressed on the web?

Files are compressed on the web so that you can load/download them more quickly. Videos on sites such as YouTube have been compressed so that it will load more quickly. Photos on sites like Facebook have been compress so that you don't have to wait 10 minutes to see someone's photos. Without compression, watching a YouTube video would take several hours!