Back to Data Compression
N
Oak National Academy
Lessons written by expert teachers in England, each with slides, a video and quizzes.
Their topic:
Data compression
For your topic:
Data Compression · Computer Science - 9210
Use these lessons alongside our lesson note, which covers your syllabus in full.
What this covers in your syllabus
3 lessons from Oak National Academy
1
Huffman coding
2
Run length encoding
3
The need for compression
Lesson 1 of 3 · GCSE level, ages 14 to 16
Huffman coding
By the end:
I can describe and use Huffman coding to create a compressed representation of data.
Key learning points
Huffman coding is a lossless compression technique.
Huffman coding assigns shorter bit sequences to more frequent characters and longer sequences to less frequent ones.
A Huffman tree is used to visually represent the encoding scheme to create compressed data.
A Huffman tree sent alongside compressed data adds overhead and can reduce the overall compression efficiency.
Keywords
Huffman tree
a special kind of binary tree used to create short binary codes for data, based on how often each piece of data appears
encoding
putting a sequence of characters into an agreed format
frequency
how often a piece of data appears in a file
A common mistake
Mistake: The Huffman tree is the compressed file.
In fact: The compressed file is a sequence of bits, and the tree is the representation of the coding system.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
What is Huffman coding?
a method for encrypting data
a way to create random data
a lossy compression technique
a lossless compression technique
What does a Huffman tree represent?
the compressed file
the encoding scheme
a sequence of bits
the file size
What is the main purpose of Huffman coding?
to increase file size
to compress data efficiently
to encrypt files
to remove all data redundancy
Check answers
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.
Read the licence
Lesson 2 of 3 · GCSE level, ages 14 to 16
Run length encoding
By the end:
I can describe and use run length encoding to compress data.
Key learning points
Run length encoding is a lossless data compression technique that reduces the size of repeating sequences of data.
Run length encoding uses the concept of redundancy to reduce file size.
Redundancy is about the repetitive information within a data set, which can be removed without losing essential meaning.
Run length encoding may not always reduce file size and may not be suitable for all applications.
Keywords
run length encoding
a common type of lossless compression
data pattern
a recurring trend, relationship, or structure found within a set of data
redundancy
repeated or extra data that isn’t needed
A common mistake
Mistake: Run length encoding always reduces file size.
In fact: Run length encoding only works well when data has long repeated patterns. If data is random or has frequent changes, RLE may not reduce the file size and can even make it bigger. For example, compressing "HELLO" with RLE results in "1H1E2L1O".
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
What type of compression is run length encoding?
lossy compression
lossless compression
random compression
encrypted compression
What is redundancy in a data set?
random information
data that cannot be compressed
repetitive information that can be removed
a method to increase data size
When does run length encoding work best?
when data has long repeated patterns
when data is entirely random
when data is encrypted
when data is already compressed
Which of the following is an example of run length encoding?
replacing ABC with XYZ
encrypting data with a password
compressing AAAA to 4A
expanding file size for clarity
Does run length encoding always reduce file size?
Yes, it always reduces file size.
Yes, even with random data.
No, it only works for encrypted data.
No, it works best with data that has long repeated patterns.
Check answers
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.
Read the licence
Lesson 3 of 3 · GCSE level, ages 14 to 16
The need for compression
By the end:
I can describe why data compression is used and explain its advantages.
Key learning points
Compression reduces file sizes, making storage and transmission more efficient.
Compressed files load faster on websites and take less time to send or receive.
Commonly compressed files include images, videos, audio, and documents.
Keywords
compression
the process of reducing file size
bandwidth
the maximum amount of data that can be transferred over a communication channel
latency
the time delay between a signal being sent and a signal being received
A common mistake
Mistake: Compression is only useful for pictures or photos.
In fact: Compression applies to many types of files such as MP3 for audio, MP4 for video, ZIP for grouped files.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
What is bandwidth?
the maximum amount of data that can be transferred over a communication channel
the time delay between sending and receiving a signal
the process of reducing file size
the total storage space on a device
What is the relationship between compression and bandwidth?
Compression decreases bandwidth usage.
Compression has no effect on bandwidth.
Compression increases bandwidth usage.
Compression slows down bandwidth.
Why is compression important for websites?
It increases page loading time.
It reduces page loading time.
It uses more bandwidth.
It decreases website quality.
Which of these is NOT a compressed file format?
MP3
JPEG
MP4
EXE
Check answers
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.
Read the licence
The wording comes from each publisher. The layout and the links to your syllabus are ours.