Computer ScienceExam code: 0984

Data Storage and Compression

Data Representation

shrinks a file so it takes up less room. Three standard exam-friendly reasons to compress:

ReasonWhat it means
Less storage spaceMore files fit on the same disk; lower storage cost
Faster transmissionSmaller files upload, download or stream more quickly
Less bandwidth usedLess data crosses the network, which matters on metered or mobile connections

A typical Cambridge question gives 3 marks for stating three distinct reasons. Distinct is the key word: "saves disk space" and "uses less storage" are the same reason in two different wordings.

Common exam question

What compression does and why files are compressed

Question: State what is meant by compressing a file, or the effect compression has on it, then give one to three benefits of compressing a file for storage or transmission (1–3 marks).

Asked in 5 of the 17 papers; three of them first ask for the definition or the effect, the same one-mark idea: compression reduces the size of the file. Each benefit is then a separate mark from the same short list every time: the file takes less storage space, it is quicker to transmit, upload or download, it needs less bandwidth, it uses less of a mobile data allowance, and it is more likely to fit under an email attachment limit.

Read the stem before you write. If it asks for a benefit of compressing for storage, give less storage space; if it already names a benefit (one paper gave storage space), give others. Each distinct benefit is credited once, so never give one benefit in several wordings.

There is always a cost. A compressed file has to be decompressed before it can be opened, which takes processor time. And some compression methods discard information that can never be recovered (covered next).

There are two completely different families of compression methods: lossless and lossy.

Common exam question

Identifying the compression method from a description

Question: Identify the compression method that permanently reduces the colour depth and resolution of an image, or the method to use when no data may be permanently removed; or give the two types of compression (1–2 marks).

Asked in 3 of the 17 papers. The two types are lossy and lossless, one mark each when both are asked for. The clue is the word permanently: a method that permanently removes data, such as cutting an image's colour depth or resolution or a sound's sample rate or resolution, is lossy; a method that removes nothing permanently, so the original file can be rebuilt exactly, is lossless. One word is the whole answer.

Build on this topic