What is Data Compression?

Posted By BrokenClaw on April 1, 2008

Data compression, or file compression, is a function performed by computers to decrease the size of a data file, while controlling the amount of information that gets lost. The purpose of data compression is to reduce the amount of space required to store the file on a hard disk, memory card, or optical disk, and to reduce the bandwidth required to transfer the file from one place to another. It’s the same reason why liquid laundry detergent, orange juice, and canned soup come as concentrates. The manufacturers simply remove much of the water, because you can add it back yourself without compromising the integrity of the final product.

Early file compression techniques were aimed at text files. It is relatively easy to reduce the size of text files with some simple rules and codes for common repetitions. For example, you could remove the space after every comma and period, remove the u after each q, change all th‘s to *, etc. With a few such rules, text files can be compressed to a fraction of their original size. Of course, to get the original file back, you have to know what the compression rules were.

Compression today is much more important in digital media files. Most people are familiar with the JPG (usually pronounced jay-peg) photo format. JPG is a compression system that is based on human perception. For example, a raw digital photo of the sky may contain thousands of shades of blue, which is more than the human eye can distinguish. So JPG compression smooths out the blues to just a few distinct shades, which reduces the amount of data necessary to display the photo.

The difference between photo compression and text compression is that some of the original data is actually lost. You can’t get back the thousands of shades of blue once the photo is compressed. This type of compression is called lossy compression, because there is loss of some of the information in the process. In lossless compression, all of the original data is preserved. Most graphics programs allow you to set the level of lossy compression, as a percentile, when saving or converting JPG files. The level of compression will determine how sharp or fuzzy the final photo will be.

Read more about Audio and Video Compression.


Comments are not allowed.

Switch to our mobile site