Students learn the difference between lossy and lossless compression by experimenting with a simple lossy compression widget for compressing text. Students then research three real-world compressed file formats to fill in a research guide. Throughout the process they review the skills and strategies used to research computer science topics online, in particular to cope with situations when they don't have the background to fully understand everything they're reading (a common situation even for experienced CS students).



Students will be able to:


The first goal of this lesson is straightforward: understand what lossy compression is and when/why it might be used. Students should see a number of examples of this distinction throughout the lesson and should leave the lesson being able to describe the relative benefits of each.

The second goal of this lesson is to build up students' research skills both for the project they will complete in the next lesson and for the Explore PT at the end of the year. Students will need practice finding reliable sources, reading technical articles, and synthesizing information. The teacher's role in calling out the skills being used, not merely the facts being found, is significant.


Getting Started

Quick Discovery: Lossy Text Compression

Try out the "Lossy Compression Widget" found in the Resources section above.

"Lossy" compression -- yes, that's the official word -- does something else. Lossy compression schemes are ones in which "useless" or less-than-totally-necessary information is thrown out in order to reduce the size of the data. The lossy text compression app did that, and for the most part, you could probably make out what the text was supposed to say. But it's not perfect. If you saw the word "fd" it could be "food," "feed," "feud," or "fad." By reading it in context, you might know what it was supposed to be, but there's no real way to know what the original word was. The original word is lost.


Today you and a partner (if available) will do some rapid research and reporting on some of the most common file formats. Use the web as your research tool. Follow the File Formats and Compression - Activity Guide to answer the questions. Then answer the Assessment questions about lossy and lossless compression techniques on the second page.

Pro Tip: Conducting research online about CS topics is a skill. Often it means hunting through articles you don't completely understand for the key pieces of information that you do. Other subjects like history or math may have classic agreed upon texts but in the world of CS you'll often end up on Wikipedia or online forums. This is ok. We're going to keep working on this skill of reading technical articles. If you sometimes are confused that's ok and entirely normal. There is no one on earth who understands everything about CS with how large a subject it is and how quickly it's changing. When you're doing research as a computer scientist it usually means sticking with it even if a lot of the content doesn't make sense at first.

Pro Tip: Record Research Strategies - Throughout this activity consider writing and recording strategies that students are using in order to conduct their research. This could be on a poster, the board, or some kind of shared digital notes. Students are going to have another chance to research formats in the following lesson, so an important goal in this lesson is highlighting how students are succeeding at doing this research, not just the information they're finding.

Wrap Up

Lossy compression seems to be "worse" than lossless compression but obviously both are being used all the time. Write down three reasons or situations where someone would be willing to use lossy compression even though it means some loss of quality.

Standards Alignment