Data Compression


Criteria

Survey Formats

Basics

Compression Methods

Data Formats


Run Length Encoding

General Principle

Control Characters

RLE for Image Data

Pixel Coding

Sequential Processing

Line Coding

Cross-Coding

End of Line Marker

Repetition of Lines

Lossy RLE

Implementations


Glossary

Index


Download


www.BinaryEssence.com

Pixel Coding


Conventional RLE procedures base on the standard unit byte. That is well-suited for image data consisting of 256 colours at maximum. For larger colour resolutions the efficiency of the compression algorithm decreases drastically because longer sequences consisting of identical components appear only for gray scaled colours. The components of any other colour differ within the data structure of a pixel.


An RGB image with a colour resolution of 8 bit does not contain recurring symbols on a byte level even for single coloured areas. The most simple solution is to collect the colour components to the basic unit pixel and to asign the counter to repetitions of pixels instead of bytes.


Coding scheme for pixel:




Beyond this simple coding scheme more specilized variants exist, for example the RLE4 scheme used for Microsoft Bitmaps consisting of 16 colours.


 <   ^   > 

 MS-Windows .bmp RLE4 

RLE for Image Data RLE for Image Data Sequential Processing