# Run length encoding

## Quiz by GCSE Computer Science Teacher 2

GCSE (AQA)
Computer Science
English National Curriculum

### Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

12 questions
• Q1
What is RLE (Run Length Encoding)?
A count of the number of words in a program
A searching algorithm
The length of time it takes an algorithm to run
A compression algorithm
30s
3.3.8.c
• Q2
Which of these is not an advantage of RLE?
It is a lossless compression technique
It can be used on multiple file types
It can greatly reduce the size of a file if there are enough patterns or 'runs' of data
If there are not enough patterns it can result in a larger file size
30s
3.3.8.c
• Q3
Which of these is not part of the RLE process of compressing documents?
The letter and its number of occurrence is recorded in a pair
Pairs are stored in a binary tree
The occurrence of concurrent letters are recorded
The next letter is recorded once a new letter is reached
30s
3.3.8.c
• Q4
What would the following set of letters be encoded as? 'aaabbbcccdddeefg'
(a, b, c, d, 3) (e, 2) (f, g, 1)
(a, 3) (b,3) (c, 3) (d, 3) (e, 2) (f, 1) (g, 1)
(a)(b)(c)(d)3 (e)2 (f)g() 1
(a, 3) (b,3) (c, 3) (d, 3) (e, 3) (f, 3) (g, 3)
30s
3.3.8.c
• Q5
How many bits are needed for each 'run' of data?
16
8
2
4
30s
3.3.8.c
• Q6
If the raw string 'aaabbbcccdddeeefg' uses 17 bytes, how many does the RLE version use?
7
17
14
10
30s
3.3.8.c
• Q7
How does RLE compression work on images?
It groups together pixels of similar sizes
It groups together all pixels of the same colour in the whole image
It groups together pixels of the same colour that are next to each other in a run
It looks for similar shades of colours and makes them one shade
30s
3.3.8.c
• Q8
What would the first line of this image look like after being compressed using RLE?
01110
030
01 13 01
02 13
60s
3.3.8.c
• Q9
What would the second line of this image look like after being compressed using RLE?
11011
212
00100
02 11 02
60s
3.3.8.c
• Q10
Which row of the image is encoded as O2 Y1 O2
2nd
5th
1st
3rd
60s
3.3.8.c
• Q11
RLE compression is able to encode which of these data types or representations?
Pixels
Strings of multiple characters
Single Characters
All of these
60s
3.3.8.c
• Q12
Why would the RLE compressed version of this use more storage than the original?
There are only two colours in use
RLE compressed images always use more space
There are too many similar colours
There are not enough patterns
60s
3.3.8.c

Teachers give this quiz to your class