If you have ever sent a folder to a zip file in order to make it smaller and therefore make sending it to someone else via email or upload, then you have engaged in file compression. Whenever you download a file or piece of software or something along those lines from the Internet to your computer, you will likely get that information in a zip file as well – and before you can actually use it properly, you must unzip the folder to get the files out and make them usable again. The reason you need to unzip or extract those files is that they have been compressed in order to transfer more quickly or take up less space on your hard drive or other storage device. In other word

s, the number of bits and bytes found in the file has been reduced. Then, when you unzip or extract the files, your computer system uses a program like WinZip to expand the files back to their original form. If it is all done correctly, the expanded file will be identical to the original file before it went and got compressed.

It may seem odd – after all, if you compress a file and reduce the overall number of bits and bytes, how can you get those exact bits and bytes back again, whether you are on a completely different computer or not? When you reduce something, you are taking parts of it away, so the mechanics of file compression do not often make sense to people upon first glance. Surprisingly, though, the mechanics of file compression are pretty straightforward and simple, and the whole thing actually make a lot of sense once you hear how it works.

 

The truth is that most computer files have the same information listed over and over and over again. Computer files are fairly redundant in that sense, and what file compression does is simply get rid of all the redundancy in a file. Rather than list the same exact piece of information over and over again, the file compression program lists that information one time only, and then just refers back to it whenever it appears again in the original file. In this way, you can make your original file smaller, send it to someone else, and then have it end up an exact replica of the original file on the other end.

 

File compression software works off of something like a library. The library contains something like a dictionary. Each piece of information in the file is assigned a specific value, perhaps something like a number, and then rather than repeating the piece of information every time it appears, the program replaces it with the corresponding entry in the library. That way, it simply writes down that short number instead of the whole piece of information, which could be very long.

 

You could actually recreate the compressed file on your own if you knew what library was used to compress it, much like using a decoder ring when you were a kid to spell out your top secret message. That is what a file compression program does on the other end as it extracts a file and expands it back to its original form – it compares the information in the file against the library and adjusts it accordingly.

 

But file compression goes even further than this to make your files as small as possible. If it were to only use the library to replace redundant bits of information every time, the file would not be that much smaller than its original size. Instead, file compression software also looks for patterns that get repeated over and over again. If a pattern is found and it is big enough or common enough, then that pattern will be assigned an entry in the library of its own, allowing larger amounts of information to be represented by a single value.

 

How small your file can compress to depends on the file type, file size and the compression set up. Text files are very easy to compress effectively, but files like mp3s do not contain as many redundancies and therefore cannot be compressed as small. Either way, file compression is a great way to make data transfers more efficient and to economize space on your hard drive.