Coding - Compression

  Classroom Resource Information  


Coding - Compression


Content Source:

CS Field Guide
Type: Lesson/Unit Plan


Data compression reduces the amount of space needed to store files. If you can halve the size of a file, you can store twice as many files for the same cost, or you can download the files twice as fast (and at half the cost if you're paying for the download). Even though disks are getting bigger and high bandwidth is becoming common, it's nice to get even more value by working with smaller, compressed files. For large data warehouses, like those kept by Google and Facebook, halving the amount of space taken can represent a massive reduction in the space and computing required, and consequently big savings in power consumption and cooling, and a huge reduction in the impact on the environment.

Common forms of compression that are currently in use include JPEG (used for photos), MP3 (used for audio), MPEG (used for videos including DVDs), and ZIP (for many kinds of data). For example, the JPEG method reduces photos to a tenth or smaller of their original size, which means that a camera can store 10 times as many photos, and images on the web can be downloaded 10 times faster.

So what's the catch? Well, there can be an issue with the quality of the data – for example, a highly compressed JPEG image doesn't look as sharp as an image that hasn't been compressed. Also, it takes processing time to compress and decompress the data. In most cases, the tradeoff is worth it, but not always.

Content Standard(s):
Digital Literacy and Computer Science
DLIT (2018)
Grade: 9-12
28) Develop a model that reflects the methods, procedures and concepts used by computing devices in translating digital bits as real-world phenomena, such as print characters, sound, images, and video.

Digital Literacy and Computer Science
DLIT (2018)
Grade: 9-12
29) Summarize the role of compression and encryption in modifying the structure of digital artifacts and the varieties of information carried in the metadata of these artifacts.

Tags: compression, decoding, encoding, Huffman tree, interpolation, JPEG, lossless compression, lossy compression, MP3
License Type: Attribution Non-Commercial Share Alike
For full descriptions of license types and a guide to usage, visit :
  This resource provided by:  
Author: Aimee Bates