Decoding Run-Length Compression
A student media project uses a simple run-length encoding scheme to compress black-and-white pixel data. The encoding stores pairs of numbers: the first number indicates the count of consecutive pixels, and the second number indicates the color (0 for white, 1 for black).
The compressed data sequence is: 3, 1, 2, 0, 4, 1.
Which of the following represents the original uncompressed pixel sequence?
A
1, 0, 0, 1, 1, 1, 1, 0, 0
B
1, 1, 1, 0, 0, 1, 1, 1, 1
C
3, 1, 2, 0, 4, 1
D
0, 0, 0, 1, 1, 0, 0, 0, 0
Question Leaderboard
Not enough data yet to show leaderboard.
