Images tend to have large areas that are a solid color, so that there are many pixels in a row with the same value. In Run-Length Encoding, each such set of pixel values are replaced by the run count and the run value.
-
AAAAAAAAAbbbbTTTTTTT becomes 8A3b6T
|
where the run count is the length of the run - 1.
|
This scheme is easy to implement and fast to both compress and decompress. It achieves good rates of compression on simple pictures.
|
It is not as successful on complex pictures, such as color photographs, where there are more gradations of color.
|