Compressing a picture by counting repeats
A black-and-white icon often contains long rows of identical white pixels followed by a few black ones. Instead of listing every single pixel one by one, run-length encoding stores the color once and counts how long the streak lasts, shrinking simple graphics dramatically, though a noisy photograph can actually grow larger.
Questions you could explore
- What rules allow the original picture to be reconstructed?
- When could counting runs take more space than storing pixels directly?
Start reading
- Computer Science Field GuideRun length encoding
The Computer Science Field Guide works through a black-and-white image and compares its pixel and run-length representations.
Ready to try your ideas aloud?
Your topic carries over. Record up to 2½ minutes, depending on your plan.