Algorithms Flashcards
1
Q
What is Run-length encoding (RLE)?
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 count, rather than as the original run.
2
Q
How would the following line be rendered when using RLE?
XXBBBBBWWWWWWA
A
2X5B6WA - better for shorter strings
XXBB5WW6A - better for longer, more runs