The Run-Length Encoding (RLE) algorithm is a simple form of data compression in which consecutive occurrences of the same data value (a run) are replaced by just one instance of the data value and a count of its occurrences. For example, the string "AAAABBBCCDAA" would be encoded as "4A3B2C1D2A" using RLE, significantly reducing the size if the runs are long. This method is most effective on data that contains many such runs, making it well-suited for compressing graphics, in which the same color often occurs in many consecutive pixels.
- Build and run the program
- Select the option that interests you