Lesson 4.5.6.9

4.5.6.9 Data compression Quiz: AQA Computer Science, Unit 5

20 questions

In partnership with Revision Ninja

Lesson 4.5.6.9, Data compression: 20 multiple choice questions for the AQA Computer Science (7517), Unit 5: Fundamentals of data representation, written with Revision Ninja.

Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.

Host this setFree Play

The 20 questions

  1. Why are images and sound files often compressed?

    • To make them impossible to edit, so that the original content cannot be changed later
    • To convert them into ASCII text, which is the only form that a computer can store
    • To increase their sampling rate so that they can be stored at a higher quality level
    • To reduce their size for storage and transmission
  2. Can text files be compressed?

    • No, text is already the smallest form of data, so it cannot be reduced further in size
    • Only if the text is first converted into images, which are then compressed by the codec
    • Yes, text files can also be compressed, for example with dictionary methods
    • Only if the text file contains only numbers, since letters cannot be compressed at all
  3. What is the key property of lossless compression?

    • The compressed file is always the same size as the original
    • Some data is discarded permanently to save space
    • It works only on sound files
    • The original data can be restored exactly
  4. What is the key property of lossy compression?

    • The file is compressed with no change in quality, because the codec keeps every detail intact
    • Some data is permanently discarded, so the original cannot be restored exactly
    • The original data is always restored exactly, so no information is ever lost in the process
    • It is possible only for text files, since images and sound need a different method entirely
  5. What does RLE stand for in compression?

    • Reduced length expansion
    • Repeated list enumeration
    • Random lookup encoding
    • Run length encoding
  6. Which technique replaces repeated strings with references to entries in a table?

    • Vector graphics, which describe a picture as a list of shapes rather than as stored pixels
    • Parity checking, which adds a bit to each block so that a receiver can spot a change
    • Run length encoding, which replaces each run of repeated values with a count and the value
    • Dictionary-based compression, which replaces repeated patterns with references to a table
  7. Which is a typical example of a lossy compression method for images?

    • JPEG, which discards the detail that the eye notices least to achieve much smaller files
    • PNG, which restores every pixel exactly, so the file keeps all the detail of the image
    • A plain archive file that keeps all data in its original form, which makes it very large
    • ZIP, which restores every byte exactly after decompression, so no detail is ever discarded
  8. Encode the string AAAABBBCCD using run length encoding as count and letter pairs. What is the result?

    • 4A3B2C2D
    • A4B3C2D1
    • 10A3B2C1D
    • 4A3B2C1D
  9. Decode the run length encoded string 3X2Y4Z. What is the original?

    • XYXYXYZZZZ
    • XXXYYZZZ
    • XXXYYYZZZZ
    • XXXYYZZZZ
  10. A run of 50 identical pixels is stored as one count byte and one value byte. How many bytes does the run take?

    • 50 bytes
    • 25 bytes
    • 100 bytes
    • 2 bytes
  11. Why does run length encoding work poorly on text with few repeats?

    • Each run of length 1 becomes a count plus a symbol, which can make the data larger
    • RLE removes all unique characters from the input, so only repeated symbols are kept in the output
    • RLE always halves the size of any input, whatever the pattern of repeats it is given
    • RLE only works on sound files, because it relies on the regular waveform of the audio
  12. A 1000 byte text file compresses losslessly to 400 bytes. What is the compression ratio?

    • 4 to 1, or 25 percent of the original size
    • 1.5 to 1, or 60 percent of the original size
    • 2.5 to 1, or 40 percent of the original size
    • 0.4 to 1, or 2.5 percent of the original size
  13. A 1 MB bitmap is compressed with a lossy method to 100 KB. Can the original be restored exactly?

    • Yes, if the file is opened in a browser, which restores the lost detail automatically
    • Yes, since both files show the same image when they are opened in the same viewer
    • No, the lossy version cannot be restored to the exact original
    • No, since lossy files are always larger than the lossless originals they came from
  14. Which data is most likely to compress well with run length encoding?

    • A file that is already a compressed JPEG
    • A file of encrypted data
    • A fax image with long runs of white pixels
    • A random sequence of bytes
  15. Why do dictionary methods suit English text?

    • English text contains no repeated patterns, so dictionary methods have nothing to replace
    • English uses a fixed length of one byte for every word, so no common words can be found
    • English text repeats common words and phrases, which can be replaced by short references
    • Dictionaries store every letter as a 32-bit number, which makes the stored text far larger
  16. Explain why lossy compression can make a file much smaller than lossless compression.

    • It removes the header, so the file loses only its metadata
    • It uses longer codes for common values
    • It stores each pixel with fewer bits but keeps all the information
    • It discards detail judged less important, so fewer values need to be stored
  17. A dictionary is built during compression. Why must the decoder rebuild the same dictionary?

    • So the file size is doubled for safety, which lets the decoder check each reference
    • So the decoder can skip reading the file, which saves time on each decompression run
    • So each reference can be translated back to the original text exactly
    • So the file can be encrypted with the dictionary, which hides the original text from readers
  18. A sound file is compressed losslessly to half its size. Which statement is true?

    • The file is twice its original size, because the lossless method adds a header to each sample
    • Some samples are lost, so the quality is halved along with the size of the file
    • The sampling rate is halved, so the duration of the sound doubles when it is played back
    • The original can be recovered exactly, and the file is half its original size
  19. Why might repeated lossy compression reduce quality?

    • Each pass discards more detail, so the losses build up and the original cannot be recovered
    • Lossy formats gain resolution with each save, because the codec adds detail on every pass
    • Repeated saves only change the file name and the header, leaving the picture unchanged
    • Each pass restores the discarded detail, so repeated saving gives back the original quality
  20. A photograph compressed heavily with JPEG shows blocky patches. What causes them?

    • Lossless compression left unused pixels in blocks, so the edges of the image are not filled in
    • The file was converted to vector graphics, which creates visible blocks at the edges of the shapes
    • Coarse compression discards detail within blocks, so neighbouring blocks no longer blend smoothly
    • The DAC added blocky steps during decoding, because the output stage cannot draw smooth curves

All AQA Computer Science quizzes