Skip to content

Data Compression TechniquesActivities & Teaching Strategies

Active learning works well for data compression because it is a hands-on topic where students benefit from seeing theory become practice. Compression algorithms are abstract until students encode their own data, which builds lasting understanding of how repetition and frequency affect size and quality.

Year 11Computing4 activities20 min45 min

Learning Objectives

  1. 1Compare the efficiency of lossless compression algorithms like Run Length Encoding and Huffman Coding for different data types.
  2. 2Evaluate the trade-offs between data quality and file size when applying lossy compression techniques to images and audio.
  3. 3Explain how data compression contributes to reducing the energy consumption and carbon footprint of data centers.
  4. 4Analyze the application of compression techniques in real-world scenarios such as video streaming and digital archiving.

Want a complete lesson plan with these objectives? Generate a Mission

30 min·Pairs

Pairs Activity: Manual RLE vs Huffman

Provide pairs with text or image data strips. First, apply RLE by noting runs of repeats. Then, calculate Huffman codes based on symbol frequencies using a provided tree. Compare resulting 'compressed' lengths and discuss efficiency differences.

Prepare & details

When is the loss of data quality an acceptable price to pay for reduced file size?

Facilitation Tip: During the Pairs Activity: Manual RLE vs Huffman, circulate and ask each pair to explain their encoding choices step-by-step to uncover misconceptions early.

Setup: Groups at tables with access to source materials

Materials: Source material collection, Inquiry cycle worksheet, Question generation protocol, Findings presentation template

AnalyzeEvaluateCreateSelf-ManagementSelf-Awareness
45 min·Small Groups

Small Groups: Lossy Compression Challenge

Groups select an image or audio file, compress it using free tools like TinyPNG (lossy) and ZIP (lossless), then measure size reductions and quality changes with before-after visuals. Present findings on when lossy suffices.

Prepare & details

How does Run Length Encoding differ from Huffman Coding in terms of efficiency?

Facilitation Tip: In the Small Groups: Lossy Compression Challenge, provide identical high-resolution images and audio clips so groups can directly compare quality loss across different compression levels.

Setup: Groups at tables with access to source materials

Materials: Source material collection, Inquiry cycle worksheet, Question generation protocol, Findings presentation template

AnalyzeEvaluateCreateSelf-ManagementSelf-Awareness
25 min·Whole Class

Whole Class: Carbon Footprint Debate

Display data center energy stats. Split class into teams to argue compression's environmental benefits using real file size examples. Vote on strongest cases and summarize key savings.

Prepare & details

How does data compression affect the carbon footprint of global data centers?

Facilitation Tip: For the Whole Class: Carbon Footprint Debate, assign roles like ‘data center manager’ or ‘streaming service user’ to ensure all students engage in the discussion.

Setup: Groups at tables with access to source materials

Materials: Source material collection, Inquiry cycle worksheet, Question generation protocol, Findings presentation template

AnalyzeEvaluateCreateSelf-ManagementSelf-Awareness
20 min·Individual

Individual: Algorithm Simulator

Students use online simulators to input custom data, run RLE and Huffman, and export compression ratios. Note patterns in efficiency for different data types.

Prepare & details

When is the loss of data quality an acceptable price to pay for reduced file size?

Facilitation Tip: Use the Individual: Algorithm Simulator to let students tweak parameters and observe real-time effects on file size and quality, reinforcing cause-and-effect relationships.

Setup: Groups at tables with access to source materials

Materials: Source material collection, Inquiry cycle worksheet, Question generation protocol, Findings presentation template

AnalyzeEvaluateCreateSelf-ManagementSelf-Awareness

Teaching This Topic

Teach this topic starting with lossless methods before lossy, as students need to grasp data preservation before accepting trade-offs. Use concrete examples like text or simple images to make abstract concepts tangible. Avoid rushing to applications; ensure students master encoding and decoding first. Research shows that students retain algorithmic thinking better when they physically perform the steps rather than just observe simulations.

What to Expect

Successful learning looks like students confidently differentiating between lossless and lossy methods, explaining trade-offs with examples, and choosing appropriate techniques based on context. They should also justify their choices using evidence from their own encoded files and discussions.

These activities are a starting point. A full mission is the experience.

  • Complete facilitation script with teacher dialogue
  • Printable student materials, ready for class
  • Differentiation strategies for every learner
Generate a Mission

Watch Out for These Misconceptions

Common MisconceptionDuring Pairs Activity: Manual RLE vs Huffman, watch for students assuming all compression methods lose data permanently.

What to Teach Instead

During this activity, have students decompress their encoded strings to verify the original data is reconstructed exactly. Ask them to compare the uncompressed and original versions side-by-side to demonstrate lossless preservation.

Common MisconceptionDuring Small Groups: Lossy Compression Challenge, watch for students dismissing lossy compression as always inferior.

What to Teach Instead

During this activity, guide students to compare compressed files at different quality levels next to the originals. Ask them to identify which losses are perceptible and which are not, linking the trade-off to human perception.

Common MisconceptionDuring Individual: Algorithm Simulator, watch for students believing compression always reduces file size.

What to Teach Instead

During this activity, provide students with files that are already highly compressed or random. Have them run the simulator and observe when size increases instead of decreases, prompting a discussion on data patterns and algorithm suitability.

Assessment Ideas

Quick Check

After Pairs Activity: Manual RLE vs Huffman, present students with a new string like 'WWWWXXXXYYYYZZZ' and ask them to encode it using RLE. Then, ask them to explain why RLE is effective for this specific data, focusing on repetition patterns.

Discussion Prompt

During Whole Class: Carbon Footprint Debate, facilitate a discussion using the prompt: 'When is the loss of data quality an acceptable price to pay for reduced file size?' Ask students to provide examples from music, images, or video, and justify their reasoning with evidence from their Small Groups activity work.

Exit Ticket

After Individual: Algorithm Simulator, provide students with two scenarios: 1) Compressing a text document for email. 2) Compressing a song for a music player. Ask them to identify which scenario would benefit more from lossless compression and which from lossy compression, and to briefly explain why based on their simulator observations.

Extensions & Scaffolding

  • Challenge students to design a hybrid compression method that combines RLE with Huffman for a custom dataset, then present their algorithm to the class.
  • For students who struggle, provide partially completed encodings or decoding templates to reduce cognitive load during the Pairs Activity.
  • Deeper exploration: Have students research how compression algorithms are implemented in real file formats (e.g., PNG, MP3) and present their findings to the class.

Key Vocabulary

Lossless CompressionA data compression method that allows the original data to be perfectly reconstructed from the compressed data. No information is lost.
Lossy CompressionA data compression method that reduces file size by discarding some data that is considered less important or imperceptible to humans. Original data cannot be perfectly reconstructed.
Run Length Encoding (RLE)A simple lossless compression technique that replaces consecutive occurrences of the same data value with a count and a single value.
Huffman CodingA lossless compression algorithm that assigns variable-length codes to input characters based on their frequencies, with more frequent characters receiving shorter codes.
Bit RateThe number of bits processed or transmitted per unit of time, often used to measure the quality and file size of audio and video data.

Ready to teach Data Compression Techniques?

Generate a full mission with everything you need

Generate a Mission