Six original Cambridge-style questions on compression and run-length encoding, with worked solutions.
Explain why files are often compressed before they are sent across the internet.
A text file contains XXXXXXYYZZZZZZZZZW. Each character and each count is stored in 1 byte. (a) Show the result of run-length encoding. (b) Calculate the number of bytes saved.
A music streaming service and a hospital both need to compress image and sound files. Justify the type of compression each should use.
Describe how a sound file can be compressed using lossy compression.
Explain how a text file can be compressed, and why only lossless compression is suitable.
A 1-bit image row is 10101010. It is compressed with RLE, storing each run as a (count, colour) pair. Explain the effect on the size of the data and state what type of image RLE suits.
Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.