Day 7 - Lossy Data Compression

Day 7: Lossy Data Compression

Learning Objectives

Essential Questions

Materials Needed

Vocabulary

Procedure (50 minutes)

Opening (8 minutes)

  1. Review and Connection (3 minutes)

    • Review lossless compression from previous lesson
    • Connect to today's focus on lossy compression techniques
  2. Warm-up Discussion (5 minutes)

    • Ask: "When might it be acceptable to lose some data during compression?"
    • Discuss: "How much quality loss can humans detect in images and sound?"

Main Activities (32 minutes)

  1. Lecture: Principles of Lossy Compression (12 minutes)

    • Define lossy compression: reducing file size by discarding some data
    • Explain that lossy compression works by:
      • Removing data that humans are less likely to perceive
      • Approximating similar values
      • Prioritizing perceptually important information
    • Discuss key properties:
      • Original data cannot be perfectly reconstructed
      • Generally achieves higher compression ratios than lossless
      • Quality-size trade-off can be adjusted
    • Explain when lossy compression is appropriate (photos, music, video)
    • Introduce common lossy formats (JPEG, MP3, MP4) and their uses
  2. Demo: Image and Audio Compression Examples (10 minutes)

    • Show the same image at different JPEG quality levels
    • Point out compression artifacts (blocking, ringing, blurring)
    • Explain how JPEG works (color space conversion, DCT, quantization)
    • Play the same audio clip at different MP3 bitrates
    • Explain how MP3 works (psychoacoustic model, frequency masking)
    • Demonstrate how file size decreases as quality decreases
  3. Activity: Compare Original and Compressed Media Files (10 minutes)

    • Students work in pairs with computers
    • Provide access to original and compressed versions of media files
    • Students compare:
      • Visual/audio quality at different compression levels
      • File sizes
      • Noticeable artifacts or quality issues
    • Students document their observations and preferences

Closing (10 minutes)

  1. Analysis of Compression Trade-offs (7 minutes)

    • Students complete a compression trade-off analysis worksheet:
      • For each use case (web images, professional photography, music streaming, archival storage), recommend a compression approach
      • Justify each recommendation based on the context
      • Explain the trade-offs involved
  2. Preview Next Lesson (3 minutes)

    • Explain that next class will shift focus from data representation to data analysis
    • Ask students to think about how large datasets might be analyzed

Assessment

Differentiation

For Advanced Students

For Struggling Students

Homework/Extension

Teacher Notes