Lossy vs lossless compression, run-length encoding, storage units. Jun 2023 Q5(a) and Jun 2022 Q2(e) both tested compression.
—
Best score
—
Last attempt
Best attempt progress
0
XP earned
Watch first — Craig 'n' Dave
Craig 'n' Dave · Edexcel 1CP2Compression
Key facts
Lossy vs lossless compression
Lossy compression — permanently removes data to reduce file size. Cannot be fully restored. Smaller files. Used for: images (JPEG), audio (MP3), video (MP4).
Lossless compression — no data is lost. Original file can be fully restored from compressed version. Used for: text files, programs, PNG images.
Jun 2022 Q3(b): "Lossy" is correct for an image that cannot be fully recreated.
Jun 2023 Q5(a): lossy compression means removed data cannot be restored / original file cannot be fully recreated.
Run-length encoding (lossless)
Stores runs of identical consecutive values as (value, count) pairs.
Example: AAAABBBCC → (A,4)(B,3)(C,2)
Very effective for images with large areas of the same colour (e.g. logos)
Not effective for photographs with many different colours
Lossless — original data is perfectly recovered on decompression.
Storage units — must know
1 byte = 8 bits
1 kilobyte (KB) = 1024 bytes (kibibyte) OR 1000 bytes (SI) — exams use 1024
1 megabyte (MB) = 1024 KB = 1,048,576 bytes
1 gigabyte (GB) = 1024 MB
1 terabyte (TB) = 1024 GB
1 tebibyte = 1024⁴ bytes — Jun 2024 Q2(f) used tebibytes
Exam questions — 4 questions · 12 marks · from real 1CP2 past papers
1 markLossy vs lossless1CP2 Jun 2022 Q3(b) style
An image file is compressed and the original file cannot be fully recreated from the compressed version. What type of compression was used?
A Lossless compression
B Lossy compression
C Run-length encoding
D Encryption
2 marksAdvantages of compression1CP2 Jun 2022 Q2(e) style
Give two advantages of compressing files before sending them over a network. (2 marks)
Hint: Give two distinct advantages. Each needs to explain WHY compression helps for that specific thing.
+20 XP
4 marksDiscuss lossy compression1CP2 Jun 2023 Q5(a) style
Explain why lossy compression means a file cannot be fully recreated, and describe a situation where lossy compression is appropriate and one where it is not. (4 marks)
Hint: Explain WHY data is lost → give one appropriate use case → give one inappropriate use case with reasoning.