Why compression is needed: less storage space

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Why compression is needed: less storage space

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A phone has 64 GiB of storage. Which statement is true about compressing its photos?
A Compressed photos are larger, so fewer of them fit on the phone
B Compressed photos are smaller, so more of them fit on the phone
2. Which is a reason for compressing a file to save storage space?
A The file takes up more space but loads faster
B The file takes up less space on the device
3. A music app stores 1000 songs. If each song is compressed, what happens to the total storage needed?
A It goes down
B It goes up
4. A company stores millions of images on its servers. How does compression help with cost?
A Less storage needs to be bought, so costs are lower
B More storage needs to be bought, so costs are lower
5. A photo is 8 MiB uncompressed and 2 MiB compressed. How many compressed photos fit in 80 MiB?
A 40 photos
B 10 photos

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1Uncompressed: 20 MiB, Compressed: 5 MiB ADividing the storage by a file size gives how many files fit on the device.
264 GiB / 4 GiB = 16 files BThe storage saved is found by subtracting the compressed size from the original size: 20 - 5 = 15 MiB, not by adding.
3Compression makes each song smaller, so more songs fit on a phone with 8 GiB of storage. C8 GiB / 4 MiB = 2048 songs
4Compression saves storage space, so a smaller and cheaper storage device can be bought. DSaved space = 20 MiB - 5 MiB = 15 MiB
5Compression makes files bigger, so fewer photos fit on a phone. ECompression makes files smaller, not bigger. Smaller files mean more photos fit on the phone.
6Compressed 5 MiB file + 20 MiB original = storage saved 25 MiB FThe compressed file is four times smaller, so it uses only a quarter of the storage space.

Definitions

compression saves storage

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
IF compressedSize _ originalSize THEN
2.
OUTPUT originalSize _ compressedSize
3.
OUTPUT freeSpace ___ compressedSize
4.
IF compressedSize < originalSize ____ OUTPUT "More files fit" ENDIF
5.
OUTPUT saved _ originalSize * 100

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A storage = 64
B photo = 4
C compressed = 1
D count = storage // photo
E print(count)
Question 2
A # Compressed files are larger
B song_mb = 6
C small_mb = 3
D print(song_mb - small_mb)
Question 3
A IF compressed > original THEN
B OUTPUT "More files fit"
C ELSE
D OUTPUT "Fewer files fit"
E ENDIF
Question 4
A photo_mb = 5
B small_mb = photo_mb * 5
C print(small_mb)
Question 5
A cost = 2
B big = 100
C small = big * 1.4
D print(small * cost)

Answer Key

Why compression is needed: less storage space
Section A: Quick Questions
Q1
B — Compressed photos are smaller, so more of them fit on the phone
Q2
B — The file takes up less space on the device
Q3
A — It goes down
Q4
A — Less storage needs to be bought, so costs are lower
Q5
A — 40 photos
Section B: Match the Pairs
Q1
Uncompressed: 20 MiB, Compressed: 5 MiB → The compressed file is four times smaller, so it uses only a quarter of the storage space.
Q2
64 GiB / 4 GiB = 16 files → Dividing the storage by a file size gives how many files fit on the device.
Q3
Compression makes each song smaller, so more songs fit on a phone with 8 GiB of storage. → 8 GiB / 4 MiB = 2048 songs
Q4
Compression saves storage space, so a smaller and cheaper storage device can be bought. → Saved space = 20 MiB - 5 MiB = 15 MiB
Q5
Compression makes files bigger, so fewer photos fit on a phone. → Compression makes files smaller, not bigger. Smaller files mean more photos fit on the phone.
Q6
Compressed 5 MiB file + 20 MiB original = storage saved 25 MiB → The storage saved is found by subtracting the compressed size from the original size: 20 - 5 = 15 MiB, not by adding.
Section C: Definitions
Q1
compression saves storage — Compressed files are smaller, so they take up less storage space. This means more photos or songs fit on a device, and less storage needs to be bought.
Section D: Fill in the Blanks
Q1
IF compressedSize < originalSize THEN
Q2
OUTPUT originalSize - compressedSize
Q3
OUTPUT freeSpace DIV compressedSize
Q4
IF compressedSize < originalSize THEN OUTPUT "More files fit" ENDIF
Q5
OUTPUT saved / originalSize * 100
Section E: Spot the Error
Q1
D — The number of files that fit is found by dividing the storage by the compressed size (compressed), not the original photo size. It should be count = storage // compressed.
Q2
A — Compression makes files smaller, which is why they take up less storage space. The comment should say smaller, not larger.
Q3
A — More files fit when the compressed size is smaller than the original size. The test should be compressed < original.
Q4
B — Compressing the photo to one fifth of its size means dividing by 5. Multiplying would make the file bigger. It should be small_mb = photo_mb / 5.
Q5
C — A compressed file is smaller than the original, so it must be less than 100. Multiplying by 1.4 makes it bigger. It should be small = big * 0.4, which gives 40.