Skip to content
Computer Science · Grade 9

Active learning ideas

Lossy vs. Lossless Compression

Active learning works especially well for compression because students need to see and hear the trade-offs themselves to truly grasp the concepts. When they compress their own images and audio, the impact of quality loss becomes immediately obvious, making abstract ideas tangible.

Ontario Curriculum ExpectationsCS.HS.DA.6CS.HS.N.3
25–45 minPairs → Whole Class4 activities

Activity 01

Case Study Analysis35 min · Pairs

Image Compression Lab: JPEG vs PNG

Students select personal photos and save copies as high, medium, and low quality JPEG (lossy) alongside PNG (lossless). They record file sizes, zoom in to spot quality differences, and note scenarios for each format. Pairs share findings in a class gallery walk.

Differentiate between lossy and lossless compression methods with real-world examples.

Facilitation TipDuring the Image Compression Lab, provide identical original images so students compare JPEG and PNG side-by-side on the same screen.

What to look forPresent students with a list of file types (e.g., .jpg, .png, .mp3, .wav, .zip). Ask them to classify each as typically using lossy or lossless compression and briefly state why.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 02

Case Study Analysis40 min · Small Groups

Audio Trade-Off Challenge: MP3 vs FLAC

Provide song clips for students to compress as MP3 (lossy) at varying bitrates and FLAC (lossless). Groups listen blindly, rate quality, and calculate size savings. Discuss streaming versus archiving uses.

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

Facilitation TipFor the Audio Trade-Off Challenge, preload high-quality samples so students can toggle between MP3 and FLAC versions instantly.

What to look forPose the question: 'Imagine you are designing a new app for sharing vacation photos. Would you prioritize smaller file sizes for faster uploads and lower data usage, or perfect image quality? Justify your choice, explaining which compression method aligns with your priorities and why.'

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 03

Case Study Analysis45 min · Small Groups

Media Scenario Stations: Compression Debates

Set up stations for images, audio, video, and text files. Small groups research one scenario, compress sample files, and rotate to justify lossy or lossless choices with evidence. Conclude with whole-class vote.

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

Facilitation TipSet a 10-minute timer for Media Scenario Stations to keep debates focused and ensure all groups rotate through each station.

What to look forStudents receive two scenarios: 1. Compressing a large collection of family photos for long-term storage. 2. Compressing a video for a social media post. For each scenario, they must name the type of compression (lossy or lossless) they would recommend and provide one reason for their choice.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 04

Case Study Analysis25 min · Individual

Pixel Art Compression Demo: Individual Practice

Students create simple pixel art in a drawing tool, then export with lossy and lossless settings. They measure sizes, alter images post-compression to see irreversibility, and reflect in journals on trade-offs.

Differentiate between lossy and lossless compression methods with real-world examples.

Facilitation TipUse the Pixel Art Compression Demo to let students manipulate tiny images pixel-by-pixel, making compression artifacts visible.

What to look forPresent students with a list of file types (e.g., .jpg, .png, .mp3, .wav, .zip). Ask them to classify each as typically using lossy or lossless compression and briefly state why.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

A few notes on teaching this unit

Start with real-world examples students recognize, like social media uploads or streaming music, to build relevance. Avoid overwhelming them with technical details upfront instead, let them discover the trade-offs through structured exploration. Research shows hands-on manipulation of media files leads to deeper understanding than lectures alone.

Students will confidently explain why different compression methods exist and when to use each. They will justify their choices with evidence from their hands-on work, demonstrating understanding of size, quality, and practical applications.


Watch Out for These Misconceptions

  • During the Image Compression Lab, watch for students claiming lossy compression always ruins image quality. Redirect them by asking them to adjust the JPEG slider to the highest quality setting and compare side-by-side with the original.

    During the Image Compression Lab, have students listen to the same audio clip in MP3 at 320 kbps and FLAC formats, noting how indistinguishable they sound unless played on high-end equipment.

  • During the Audio Trade-Off Challenge, watch for students thinking lossless compression never reduces file size significantly. Show them the exact file size savings in the ZIP demo by zipping a folder of images and comparing sizes before and after.

    During the Media Scenario Stations, challenge students to identify tasks where lossless compression is essential, like archiving family photos, by examining compressed files for missing details in the Pixel Art Compression Demo.


Methods used in this brief