BitMagic Home C++ Boost Logo
BitMagic Home
BitMagic News
BitMagic Technical Articles
BitMagic Documentation
BitMagic Team
BitMagic Download

What is data compression?

In its simplest form, data compression is recombining the bits and bytes that make up your data into a smaller, more compact form. The actual information doesn't change (in case of loseless compression), but the internal representation of it does.

Why is it necessary?

Without data compression, it would be virtually impossible to implement technologies such as streaming media, large database applications, or any other application that handles lots and lots of information. There is simply too much data to handle easily.

How does it work?

Data compression is a coding/decoding process. The coding side of it uses a particular algorithm to rearrange the internal representation of your data. Generally, an application handles that transparently and in many cases you don't need to know how or why it works. When it's time to actually use the information it has to be decoded, using the reverse process of the method used in the coding process.

An example of this is the popular WinZip program, which compresses data files. To add files to a WinZip archive, you use the available menu option to add a file. When you want a copy of a file within an archive, you choose to extract it. In both cases, a mouse click is all that's required of you. But behind the scenes, the WinZip program is using a particular algorithm to compress and uncompress the information in your files.

Is there more than one way to compress data?

There are many, many ways to compress data. For instance, the algorithm used for compressing an image is very different from the one used for zipping a file. Like most things in life, you learn to pick and choose what works best for a particular task.

You are already familiar with some of the methods, and you make use of them all the time. Some of the formats are JPEG (image compression), MP3 (audio compression), and ZIP (file compression). There are many more, of course, but the point is that data compression is a fact of life in the computing world.


Data compression is a mixture of art and science, and there are volumes written on how to do it. Although you don't need to know how it works in order to use it, it's always helpful to understand as much as you can.

The BitMagic Team would like for you to understand a little about how data compression works in general, as well as how it's used in our product. The articles on this site are written to help broaden your understanding so that you can use BitMagic for your application needs.