This article provides a primer on the basic types of data compression, with an introductory-level explanation of the mathematics and algorithms that go into compression techniques. Brief consideration and examples are given to help the reader evaluate what types of compression tools and techniques are suited for their own applications, and whether any are appropriate. Introduction Data compression is widely used in a variety of programming contexts. All popular operating systems and programming languages have numerous tools and libraries for dealing with data compression of various sorts. But those statements are essentially just true by definition.
Redundancy can come in a lot of different forms.
But more often redundancies tend to come on a larger scale, either regularities of the data set taken as a whole, or sequences of varying lengths that are relatively common. If this description seems a bit complex to unpack, read on to find some more practical illustrations. This article is generally about lossless compression techniques, but the reader would be served to understand the distintion first. Lossless compression involves a transformation of the representation of a data set such that it is possible to reproduce exactly the original data set by performing a decompression transformation. As a plus for the lossy techniques, they can frequently produce far more compact data representations than lossless compression techniques can.