New
New
Year 10
AQA

Run length encoding

I can describe and use run length encoding to compress data.

New
New
Year 10
AQA

Run length encoding

I can describe and use run length encoding to compress data.

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

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 - parts that repeat or follow a regular order

  • Redundancy - repeated or extra data that isn’t needed

Common misconception

Run length encoding always reduces file size.

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".


To help you plan your year 10 computer science lesson on: Run length encoding, download all teaching resources for free and adapt to suit your pupils' needs...

Make links to real use cases and explain where run length encoding is commonly used for example bitmap images, printers and document scanning. This will give context to learners and show it's not just theory.
Teacher tip

Equipment

Licence

This content is © Oak National Academy Limited (2025), licensed on Open Government Licence version 3.0 except where otherwise stated. See Oak's terms & conditions (Collection 2).

Lesson video

Loading...

Prior knowledge starter quiz

Download quiz pdf

6 Questions

Q1.
What is the compression ratio?
the ratio of the compressed data to the original data
the size of compressed data only
the processing speed of compression algorithms
Correct answer: the ratio of the original data to the compressed data
Q2.
What happens when the compression ratio is higher?
Correct answer: The file size decreases, but performance may slow down.
The file size increases.
The file size remains the same.
The file quality always improves.
Q3.
What is the term for the file size before compression?
compressed size
ratio size
Correct answer: original size
file ratio
Q4.
What is the term for the file size after compression?
file ratio
data speed
original size
Correct answer: compressed size
Q5.
What does a higher compression ratio require?
less processing power
Correct answer: more processing power and time
no decompression
increased file size
Q6.
What must be considered when selecting a compression algorithm?
file size only
Correct answer: data quality and processing speed
the compression ratio only
the type of storage device

Assessment exit quiz

Download quiz pdf

6 Questions

Q1.
What type of compression is run length encoding?
lossy compression
Correct answer: lossless compression
random compression
encrypted compression
Q2.
What does run length encoding use to reduce file size?
Correct Answer: redundancy, redundant data
Q3.
What is redundancy in a data set?
random information
data that cannot be compressed
Correct answer: repetitive information that can be removed
a method to increase data size
Q4.
When does run length encoding work best?
Correct answer: when data has long repeated patterns
when data is entirely random
when data is encrypted
when data is already compressed
Q5.
Which of the following is an example of run length encoding?
replacing ABC with XYZ
encrypting data with a password
Correct answer: compressing AAAA to 4A
expanding file size for clarity
Q6.
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.
Correct answer: No, it works best with data that has long repeated patterns.