Run-Length Encoding

Run-length encoding (RLE) is a form of lossless data compression in which “runs” of data (sequences in which the same data value occurs in many consecutive data elements) are stored as a single data value and a count of those elements, rather than as the original run. This is most efficient on data that contain many such runs, for example, simple graphic images such as icons, line drawings, Conway’s Game of Life , and animations. For files that do not have many runs, RLE could increase the files size instead.