File Compression and its Working

From making a set of files to be sent and received so quickly to converting large files into something more manageable in terms of consuming disk space without losing a single bit of data is possible through compression.

Among all the compression formats, ZIP and RAR are unique ones. If you are into web works, then you can very well realize how important it is to compress images, videos, and music for easy uploading. Also, there’s a good chance that you are not clearly know how compression on a file works, which would indicate why you are reading this post!

How Does File Compression Work?

Things get little complicated from here. Basically, there are two types of file compression: Lossless and Lossy. As the name implies, Lossless compression is the one which compresses the files and reduces the file size without the loss of any information. On the other hand, Lossy is something that lessens the file size by chopping off pieces of information that aren’t supposed to function 100%. Confused? Let’s see these two techniques one by one.

Lossless File Compression Technique

In order to reduce the file size without harming a single bit of data, the Lossless algorithm has to remove redundancy. Now, what is this redundancy you would ask? Well, it is a condition wherein a same piece of information is kept in multiple locations within a data storage environment. And with the elimination of redundancy, you’ll be left out with just one instance of each bit of data.

To better understand the concept of redundancy, consider one instance. Below is the sequence of alphabets that represent our data:


Basically, a Mask is used to hide the portions of the layer by adding it to a particular layer. Masking layers is a beautiful technique that combines multiple pictures into a single image file or removing a particular object from a picture.

The simplest way to compress it is,


You can see that the same information is there, only the thing is it has been represented in a well-simplified way by taking up a less space. In this manner, when you decompress or unzip the file, it knows how to restore back the original form. Generally, this type of lossless compression will be helpful in compressing text files, spreadsheets. This is because a document with some words or data missing is nothing less than a scrap!

Lossy File Compression Technique

This lossy compression process is as same as Lossless technique, but by name, we can tell that it results in the permanent loss of some data bits. This type of process is commonly carried out with media files such as audios, videos as well as pictures due to the fact that they won’t be affected much by the data loss. Even you can’t notice the missed bits on the file as it is out of human range.

But one downside of the Lossy method is that if you try to compress the same file repeatedly using the lossy method, you may notice some quality reduction since some data bits are being removed each time you compress. At worst case, you may end up with corruptions with an entire compressed file.

Assume that you compressed a set of media files into an RAR archive using Lossy compression method and unfortunately that archive got corrupted. You lost access to the files present in that RAR and getting some strange errors say RAR file unknown format or damaged! What will you do? It’s just simple, repair RAR file using Remo Repair RAR Tool and easily extract all the files from it.

By now, you might have realized how important it is to remember that the files compressed using Lossy method may actually lose data and get corrupt. This means you can’t actually recreate those original files that have been compressed. So taking backups is a wise idea before you compress any file.