wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Huffman Coding

Total questions: 10

Worksheet time: 4mins

Name
Class
Date
1.

Which type of compression ensures that all of the data is kept?

a)

Lossless

b)

Lossy

2.

Lossy compression removes data that isn't needed...

a)

True

b)

False

3.

Compression makes file sizes...

a)

Bigger

b)

Smaller

c)

Keeps them the same

4.

An advantage of lossless compression is...

a)

All data is lost

b)

The file size stays the same

c)

All of the important data is kept

5.

A disadvantage of lossless compression is...

a)

There is a big reduction in file size

b)

There is only a slight reduction in file size

c)

There is no reduction in quality

d)

Cannot be used on text or software files

6.

The correct encoding of the letter C in this tree is...

a)

11

b)

10

c)

01

d)

00

7.

Huffman trees use the _______________ of each character to work out their encoding.

a)

Frequency

b)

Order in ASCII

c)

Number value

8.

How do you move through a Huffman tree?

a)

0 = right 1= left

b)

1 = left 2 = right

c)

0 = left 1 = right

d)

0 = middle 1 = back

9.

How do you calculate the number of bits of a body of text in ASCII?

a)

Number of characters * 7

b)

Number of characters (including spaces) *7

c)

bits in Huffman * 7

d)

bits in Huffman / 7

10.

Which formula shows how to work out the percentage a file has been compressed by?

a)

bits in (Huffman *7) /100

b)

bits in ASCii - bits in Huffman

c)

difference in bits / bits in ASCII * 100