ImageGear .NET v24.12 - Updated
RLE Compression
User Guide > File Formats and Compressions > Compressions > RLE Compression

Full Name Run length encoding compression
Compression ID ImGearCompressions.RLE = 7
ImageGear Assembly ImageGear24.Core Assembly
Bit Depth 1, 4, 8, 16 bpc
File Formats BMP, CLP, CUT, DCX, DICOM, GEM, IFF, MSP, PCX, Adobe PDF, PS, RAS, SGI, TGAWPG
IG 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.