Close
Close full mode
logoMakeCode AP CSP

Data Compression

Summary

Materials

Instructional Activities and Classroom Assessments

  1. Data Compression Introduction (10 minutes)
  2. Lossless and Lossy in Images (20 minutes)
  3. Debrief (5 minutes)
  4. Text Compression (10 minutes)
  5. Extension Activity

Learning Objectives

  • DAT-1.D Compare data compression algorithms to determine which is best in a particular context.

Essential Knowledge

  • DAT-1.D.1 Data compression can reduce the size (number of bits) of transmitted or stored data.
  • DAT-1.D.2 Fewer bits does not necessarily mean less information.
  • DAT-1.D.3 The amount of size reduction from compression depends on both the amount of redundancy in the original data representation and the compression algorithm applied.
  • DAT-1.D.4 Lossless data compression algorithms can usually reduce the number of bits stored or transmitted while guaranteeing complete reconstruction of the original data.
  • DAT-1.D.5 Lossy data compression algorithms can significantly reduce the number of bits stored or transmitted but only allow reconstruction of an approximation of the original data.
  • DAT-1.D.6 Lossy data compression algorithms can usually reduce the number of bits stored or transmitted more than lossless compression algorithms.
  • DAT-1.D.7 In situations where quality or ability to reconstruct the original is maximally important, lossless compression algorithms are typically chosen.
  • DAT-1.D.8 In situations where minimizing data size or transmission time is maximally important, lossy compression algorithms are typically chosen.

Details

1. Data Compression introduction (10 minutes)

  • Explain what data compression is.
  • Explain why we need data compression.
  • Discuss the cost of data storage.
  • Discuss the two types of data compression.

2. Lossless and Lossy in Images (20 minutes)

  • Discuss lossy and lossless in images.
  • Create an image activity.

3. Debrief (5 minutes)

  • Discuss students observations regarding the different image files they created.

4. Text Compression (10 minutes)

  • Discuss how text compression programs work.
  • Discuss Run Length Encoding.

5. Extension activity

πŸ“˜ Unit 6 - DAT β€” Previous
Day 15
Next β€” πŸ“˜ Unit 6 - DAT
Reduce the File Size of your Word Documents