Back to Data Compression

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

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

  1. Huffman coding is a lossless compression technique.
  2. Huffman coding assigns shorter bit sequences to more frequent characters and longer sequences to less frequent ones.
  3. A Huffman tree is used to visually represent the encoding scheme to create compressed data.
  4. 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?
What does a Huffman tree represent?
What is the main purpose of Huffman coding?

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

  1. Run length encoding is a lossless data compression technique that reduces the size of repeating sequences of data.
  2. Run length encoding uses the concept of redundancy to reduce file size.
  3. Redundancy is about the repetitive information within a data set, which can be removed without losing essential meaning.
  4. 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?
What is redundancy in a data set?
When does run length encoding work best?
Which of the following is an example of run length encoding?
Does run length encoding always reduce file size?

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

  1. Compression reduces file sizes, making storage and transmission more efficient.
  2. Compressed files load faster on websites and take less time to send or receive.
  3. 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?
What is the relationship between compression and bandwidth?
Why is compression important for websites?
Which of these is NOT a compressed file format?

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.