ImageGear for C and C++ on Linux v18.8 - Updated
RLE Compression
User Guide > File Formats and Compressions > Compressions > RLE Compression

RLE Compression

Full Name Run length encoding compression
Compression ID IG_COMPRESSION_RLE = 7
ImageGear Component Core
Bit Depth 1, 4, 8, 16 bpc
File Formats BMP, CLP, CUT, DCX, DICOM, GEM, IFF, MAC, MSP, PCX, Adobe PDF, Adobe PS, RAS, SGI, TGA, WMF, WPG
ImageGear Platforms Support WIN32, WIN64, Unix, Unix64, .NET, .NET64, MAC

Comments:

RLE (Run Length Encoding) is normally a 1-dimensional compression scheme. Working sequentially from left to right and top to bottom, it compares the value of each byte with the value of the previous byte. Each data value is recorded into a "packet" of two bytes where the first byte contains the number of times the value is repeated, and the second packet contains the actual value. The bytes in the pocket are called the "run count" and the "run value". When an image contains many repeat values, the compression ratio is very high (for example, if every byte in a 100 byte image were the same, its size could be reduced to 2 bytes giving a 50:1 ratio). A very noisy image, or a plain ASCII text file typically does not compress well, and in fact could become larger for example, if all bytes in image are different from the ones next to them, the image doubles, because 2 bytes are used to store each byte in the image.

The terms "RLE" and "Packbits" are often used synonymously.