Compression: Lossy and Lossless · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.
En anglais

Keep every bit, or drop what hides

Computing · Computer Systems · ages 15-16
Name ______________________   Date ____________
  1. In the lesson's run-length code, what does the first count in each row describe?

    • The run of black pixels
    • The run of white pixels
    • The number of rows
  2. What does lossless compression promise?

    • Files shrink tenfold always
    • Dropped detail returns later
    • Every bit returns exactly
  3. In a white-first code where 0 is white and 1 is black, the row 1100000000000000 is encoded. What is its first count?

    • 0
    • 2
    • 14
  4. Which kind of compression suits program code?

    • Lossy, since a few lost bits go unseen
    • Lossless, since each bit must come back
    • Either kind, since code files are always tiny
  5. A white-first code gives the counts 2, 6, 1, 5 and 2 for one row. How many black pixels does the row hold?

    Answer: ______________

  6. Which kind of compression suits holiday photos for sharing?

    • Lossy, since eyes forgive the trims
    • Lossless, since photos need ZIP
    • Neither, since photos resist packing
  7. Lossy detail, once dropped, can be rebuilt from the small file.

    Circle one:   True   False

  8. A friend edits one lossy photo ten times, re-saving after each edit, and it ends up blurry. What should they do next time?

    • Re-save at the same setting to lock quality
    • Wait, since lossy files recover detail later
    • Keep a lossless master and export copies
LightMySky · lightmysky.comW1-mt_lx2U-B9CFa-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

Keep every bit, or drop what hides W1-mt_lx2U-B9CFa-s1

  1. The run of white pixels · In this scheme the counts always start with the white run, even when that run is 0.
  2. Every bit returns exactly · Lossless compression stores the same information in fewer bits, so every bit comes back.
  3. 0 · The row opens with black, so the code records zero white pixels before it. The full code is 0, 2, 14.
  4. Lossless, since each bit must come back · Code changes meaning if one bit changes, so nothing may go missing.
  5. 11 · Counts alternate white, black, white, black, white, so the black runs are 6 and 5, which make 11.
  6. Lossy, since eyes forgive the trims · People barely notice the dropped detail in a shared photo, and the lossy file is much smaller.
  7. False · Dropped detail is not stored anywhere, so it cannot be rebuilt. Only lossless compression returns every bit.
  8. Keep a lossless master and export copies · Each lossy save drops more detail, so edit a lossless master and export a lossy copy at the end.
Worksheet · LightMySky