Compression (Cambridge (CIE) A Level Computer Science): Flashcards

Exam code: 9618

1/27

0Still learning

Know0

  • Define compression.

Cards in this collection (27)

  • Define compression.

    Compression is reducing the size of a file so that it takes up less space on secondary storage.

  • Give two scenarios where compression is needed.

    To maximise the amount of data that can be stored on a digital device, and to minimise the transfer time of data being uploaded, downloaded or streamed across a network.

  • Name the two methods by which compression can be achieved.

    Lossy and lossless compression.

  • Define lossy compression.

    Lossy compression is when data is lost in order to reduce the size of a file on secondary storage, and it is irreversible.

  • What kind of data is lossy compression suitable for?

    Data where reducing quality is acceptable, for example images, video and sound.

  • How does lossy compression reduce the size of a photograph?

    It groups similar colours together, reducing the number of colours in the image without compromising its overall quality.

  • Define lossless compression.

    Lossless compression is when data is encoded to reduce the size on secondary storage, and it is reversible — the file can be returned to its original state.

  • What kind of data is lossless compression more suitable for?

    Data where a loss in quality is unacceptable, for example documents, although it can be used on all data.

  • In a document, lossless compression uses algorithms to look for patterns and                     .

    In a document, lossless compression uses algorithms to look for patterns and repetition.

  • What happens when a lossless compressed document is opened?

    The decompression process reverses the algorithms and returns the data back to its original state.

  • How do lossy and lossless compare on how much they reduce a file?

    Lossy can greatly reduce the size of a file but at the expense of quality, while lossless reduces the size not as dramatically but keeps the data intact.

  • True or False?

    A file compressed using lossy compression can be returned to its original state.

    False.

    Lossy compression is irreversible; only lossless compression is reversible.

  • By how much can MP3 audio compression reduce a typical music file?

    By up to 90%, for example from 80 MB down to 8 MB.

  • MP3 uses                      music shaping to remove sounds we do not notice.

    MP3 uses perceptual music shaping to remove sounds we do not notice.

  • Which two kinds of sound does perceptual music shaping remove?

    Frequencies outside the human hearing range, and quieter sounds that are masked by louder ones.

  • Is MP3 a lossy or lossless format, and what does that mean?

    MP3 is lossy — some original data is permanently lost and the original file cannot be recovered.

  • How does MP4 differ from MP3?

    MP4 stores more than just audio — it can hold music, videos, photos and animations — and is commonly used for streaming videos over the internet.

  • What happens to the original file when a bitmap is compressed as a JPEG?

    The JPEG compression algorithm creates a new file, so the original file can no longer be used.

  • Why can scalable vector graphics be compressed?

    SVG files use an XML text file, which allows them to be compressed — although vector graphics compress with limited success overall.

  • Define run-length encoding (RLE).

    Run-length encoding is a form of data compression that condenses identical elements into a single value with a count.

  • What is the plain RLE encoding of the string AAAABBBCCDAA?

    4A3B2C1D2A — four As, three Bs, two Cs, one D and two As.

  • How are the count and the character stored in binary RLE?

    The count is stored in a fixed size binary format, and the character is stored using its ASCII value.

  • What is the binary RLE representation of 4A?

    0000100 1000001 — 0000100 is binary for the count 4, and 1000001 is binary for 'A', which is 65.

  • What does RLE use to compress bitmap image data?

    Frequency/data pairs, which group pixel colours together.

  • An image needs 195 bits uncompressed and 38 bits with RLE. What is the saving?

    A saving of 157 bits, which is about 80%.

  • How is RLE data stored for an image using more than two colours?

    The RGB value for each colour is stored along with the count, so ten black pixels are stored as the count 10 followed by 0 0 0.

  • True or False?

    An RLE frequency/data pair must stop at the end of each row of the image.

    False.

    Data pairs can carry over on to the next line, so a run at the end of one row continues into the start of the next.

Sign up to unlock flashcards

or