Skip to content
Computer Science · Grade 10

Active learning ideas

Data Compression Techniques

Students learn compression best by directly manipulating real files, not just reading about algorithms. When they see file sizes shrink before their eyes and witness restored data match the original, the abstract concept clicks into place.

Ontario Curriculum ExpectationsCS.HS.D.2CS.HS.D.3
25–45 minPairs → Whole Class4 activities

Activity 01

Case Study Analysis35 min · Pairs

Pairs Lab: Image Compression Test

Pairs download identical images and apply lossless PNG and lossy JPEG compression at varying levels using free editors like GIMP. They record file sizes, rate visual quality on a 1-5 scale, and compare results in shared documents. Discuss which method suits web photos.

Differentiate between lossless and lossy compression techniques.

Facilitation TipIn the Pairs Lab, prepare identical original PNG files and compressed versions beforehand so students can see visual differences immediately.

What to look forPresent students with three scenarios: compressing a text document for email, compressing a photograph for a website, and compressing an audio file for a podcast. Ask them to identify which type of compression (lossless or lossy) would be most appropriate for each and provide a one-sentence justification.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 02

Case Study Analysis45 min · Small Groups

Small Groups: Audio File Challenge

Groups select short audio clips and compress them lossless with FLAC and lossy with MP3 tools. They calculate size reductions, conduct listening tests, and graph quality versus ratio. Present findings to justify choices for music storage.

Analyze the trade-offs between file size reduction and data quality.

Facilitation TipFor the Audio File Challenge, provide the same audio clip at three compression levels so students can compare sound quality and file sizes side-by-side.

What to look forOn an index card, have students define 'lossless compression' in their own words and provide one example of a file type or situation where it is essential. Then, ask them to define 'lossy compression' and provide one example where it is commonly used.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 03

Case Study Analysis25 min · Whole Class

Whole Class: Compression Scenario Debates

Display scenarios like archiving documents or streaming video. Students vote on lossless or lossy, then justify in quick rounds. Tally results and review trade-offs with class input.

Justify the choice of a specific compression method for different types of data.

Facilitation TipDuring Compression Scenario Debates, assign roles like 'user,' 'developer,' and 'storage manager' to push students to consider multiple perspectives.

What to look forFacilitate a class discussion using the prompt: 'Imagine you are designing a new online photo-sharing platform. What are the key factors you would consider when deciding whether to automatically compress user-uploaded images using a lossy method, and what are the potential benefits and drawbacks for your users?'

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 04

Case Study Analysis30 min · Individual

Individual: Data Type Research

Students research optimal compression for text, video, or executables, test one example each, and submit reports with size-quality metrics. Share top insights in a class padlet.

Differentiate between lossless and lossy compression techniques.

Facilitation TipIn Data Type Research, require students to include actual file sizes and compression ratios in their reports to ground their findings.

What to look forPresent students with three scenarios: compressing a text document for email, compressing a photograph for a website, and compressing an audio file for a podcast. Ask them to identify which type of compression (lossless or lossy) would be most appropriate for each and provide a one-sentence justification.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

A few notes on teaching this unit

Teachers should begin with lossless examples students already know, like ZIP files, before introducing lossy methods. Avoid technical jargon like 'entropy' or 'discrete cosine transform' until students grasp the core trade-offs. Research shows learners grasp compression better when they experience both the technical process and the human-centered consequences.

Students should explain when to use lossless versus lossy compression based on file purpose, calculate approximate size reductions for different data types, and justify choices with evidence from their experiments.


Watch Out for These Misconceptions

  • During the Pairs Lab, watch for students who assume all compression permanently alters data.

    Have pairs unzip their text files to confirm identical contents match the original, then compare PNG pixel values to show where lossless preserves every detail.

  • During the Audio File Challenge, listen for students who reject lossy compression entirely after hearing any quality loss.

    Guide students to plot file sizes against perceived quality ratings to find the point where additional size reduction no longer improves listening experience.

  • During Data Type Research, notice if students assume compression works the same across all file types.

    Ask groups to present their findings for text, images, and audio side-by-side to reveal how algorithms match data structures differently.


Methods used in this brief