Computer Science – Data storage and compression | e-Consult
Data storage and compression (1 questions)
Run-length encoding (RLE) is a simple lossless data compression technique. It works by replacing consecutive occurrences of the same character with a single instance of the character and a count of how many times it repeats. For example, the string "WWWWWWWWWWWWB" can be compressed to "12W1B".
RLE is commonly used in bitmap images, particularly those with large areas of the same color. Bitmap images often have large sections of identical pixels. By representing these repeating sequences with a count and the value, the file size can be significantly reduced. It's effective because it exploits the redundancy in the data – the repetition of the same pixel values.