RLE (Run Length Encoding)

RLE stands for run length encoding and is a form of data compression used primarily for storing graphic data on computers. RLE works by takings long strings of similar data and storing only one piece of it as well as the length of it.

For example, if the data string was "AAAAAABBBCCCCCCCCDDD" a RLE compressed string would look like "A5B3C8D3".

By storing the run of each piece of data space can be saved. However, this form of compression doesn't work well on types of data that do not have similar runs of information.

In RLE, the word "HELLO" becomes "H1E1L2O1" increasing the size. Because of the way this compression algorithm works, it is very poor for storing documents, programs, or photographs, but it works very well for storing computer screenshots because they often have long runs of pixels of the same color.

RLE codecs are very common because they are so simple to write.