August 2024
Beginner
216 pages
5h 24m
English
Run length encoding is a lossless data compression algorithm usually used to compress repetitive data. The aim is to reduce the number of bits used to represent a set of data.
The compression process involves counting the number of consecutive occurrences of each character (called a run).
Let’s have a look at an example.
aaaaaaaabbbbbbcc
We can encode this as

aaaaaaaabbbbbbcc would be encoded as a8 b6 c2
Encoded in ASCII the data stream would be 16 bytes.
01100001 01100001 01100001 01100001 01100001 01100001 01100001 01100001 01100010 01100010 01100010 01100010 01100010 01100010 01100011 01100011
Using RLE, the data stream ...
Read now
Unlock full access