File compression

When we save any sort of file, for example, an image, audio file, etc. it can take up a lot of storage on our hard drive (or, more likely, SSD).

To save space, we can use something called compression. This is when we take a large file and making it smaller, by removing some of the data from it.

Types of compression

Depending on whether the original file can be perfectly reconstructed from the compressed version or not, there are two types of compression:

Benefits of compression

Compressing a file makes it smaller: there are two main benefits to this:

Drawbacks of compression