top of page

Developed as part of the Extending the CS Pipeline: Enhancing Rigor and Relevance in Middle School CS Project.


In this lesson package, students explore how computers efficiently store and transmit information through

compression. Over two class periods, students begin by investigating how repeated patterns in text can be

identified and encoded to reduce file size without losing information. Through interactive and unplugged activi-

ties, they develop their own strategies for compressing text and discover that effective compression involves

recognizing patterns and balancing tradeoffs between the encoded message and the information needed to

decode it.


Building on this foundation, students then apply these ideas to digital images. They learn that images are com-

posed of grids of pixels and use run-length encoding to compress pixel data by representing consecutive runs of

the same color more efficiently. By comparing images that compress well with those that do not, students

deepen their understanding that compression is not universally effective, but instead depends on the structure

and patterns within the data.



Throughout the lesson, students make connections between abstract concepts and real-world applications,

such as how computers store photos, stream videos, and transmit files. By the end of the lesson package, stu-

dents will have a foundational understanding of how compression works across different types of data and why

it is essential for managing memory and optimizing performance in modern computing systems.


This lesson package includes:


  • A Student Worksheet with Video Questions

  • Unplugged Text Compression Activity Instructions




Suggested Citation:

Center for Effective School Practices. (2025). Compression and Memory [Lesson Plan Package]. Rutgers University. https://cesp.rutgers.edu/eir-resource-library/compression-&-memory/

Compression & Memory

bottom of page