- Run Length Encoding (RLE): The color of a pixel is given, followed by the number of repetitions of that color if you read the picture in rows.
The above picture would be encoded as
B2C2D2E1B1A5E1C1D1E1F1C1D1E1F1D2E2F2G1, if the colors are
A, ... G.
- LZW-compression (Lempel, Ziv, Welch) works similar to Lempel and Ziv's algorithm, only that the dictionary doesn't have to be created and stored---a fixed dictionary of patterns is used.
- JPEG compression. The picture is divided into 8*8 pixel blocks.
For each of the basic colors (red, green, blue), each such block can be generated by taking a weighted sum of 64 possible patterns (like horizontal stripes, vertical stripes, checkerboard, etc. The weights may be complicated numbers, like 1000/1637 times pattern A, 523/1637 times pattern B, 114/1637 times pattern C. Since storing such fractions requires a lot of space, these numbers are usually simplified, maybe to 10/16, 5/16, 1/16, or even further like in 3/6, 2/6, 1/6. This process is irreversible.
- JPEG200 compression uses wavelets, a relatively new mathematical method.
Full page view