run-length encoding
Quick Summary
Run-length encoding (RLE) is a simple form of data compression used in computer science. It is particularly effective for data that contains long sequences of identical values, often referred to as "runs." Instead of transmitting every single repeated value, RLE replaces these runs with a code that specifies the value and the number of times it repeats.12
For example, if a sequence contains "AAAAA," RLE would represent it as "5A" (or a similar notation), significantly reducing the amount of data to be stored or transmitted. This method is efficient for data like simple graphics or faxes where large areas of solid color (represented as repeating 0s or 1s) are common. While not as sophisticated as some other compression techniques, RLE is straightforward to implement and computationally inexpensive.12
Ask Britannica AI about this topic
Britannica doesn't have a full article on this topic, so we've curated a list of our relevant coverage.
