Representing Text, Sound, Images and Storage: Question 4

Syllabus 1.3

Structured 8 marks

A satellite research station stores one day's sensor readings as a single uncompressed sound recording for later analysis. The uncompressed recording has a file size of 5 gibibytes (GiB).

(a) State how many mebibytes (MiB) are equal to 5 gibibytes (GiB). [1]

(b) Before transmitting the recording to a base station, the satellite compresses it using lossless compression, reducing the file size to 3840 mebibytes (MiB). Calculate the percentage reduction in file size caused by the compression. Show all your working. [3]

(c) Explain why lossless compression, rather than lossy compression, is the more suitable choice for compressing this sensor data. [2]

(d) One method of lossless compression is run-length encoding (RLE). Describe how RLE could reduce the file size of a sensor reading that contains many repeated identical values in sequence. [2]

Show worked solution Hide worked solution

Worked solution

Part (a): Converting gibibytes to mebibytes

Each unit of data storage is 1024 times the size of the unit below it, so 1 gibibyte (GiB) equals 1024 mebibytes (MiB), not 1000, because these binary-prefixed units are based on powers of 2.

5 x 1024 = 5120

So 5 GiB = 5120 MiB.

Part (b): Calculating the percentage reduction

To compare the two file sizes, both must be in the same unit, mebibytes. From (a), the original file size is 5120 MiB, and the compressed file size is 3840 MiB.

Find the reduction in size:

5120 - 3840 = 1280 MiB

Find this reduction as a percentage of the original file size:

(1280 / 5120) x 100 = 25

So the compression achieves a 25% reduction in file size.

Part (c): Why lossless compression is more suitable

Lossy compression permanently removes some of the original data to achieve a smaller file, while lossless compression reduces the file size without losing any data at all. For sensor readings collected for scientific analysis, permanently discarding data is risky: a value removed by lossy compression could be a genuine (and possibly important) measurement, and losing it could make later analysis inaccurate or unreliable. Lossless compression avoids this risk, even though it usually cannot shrink the file as much as lossy compression could.

Part (d): How run-length encoding (RLE) works

RLE looks through the data for runs, sequences where the same value repeats one after another. Instead of storing that value separately for every repeat, RLE stores the value once together with a count of how many times it repeats in a row. For sensor data that contains long runs of an identical repeated reading, this run can be rebuilt exactly from the stored value and count, so the file becomes smaller without any of the original readings being lost.

Final answers

  • (a) 5 GiB = 5120 MiB
  • (b) Percentage reduction = 25%
  • (c) Lossless compression avoids permanently losing any sensor readings, which lossy compression cannot guarantee.
  • (d) RLE replaces a repeated run of the same value with the value and a count of its repeats, rebuilding the run exactly with no data lost.