Data compression

EasyMedium
12345678910111213141516171819
Question 10
Medium

Table 1 shows the Huffman codes for the characters used in the string BANANABANDANAS.

Calculate how many bits would be saved if the string BANANABANDANAS was encoded using the Huffman codes shown in Table 1, rather than using standard 8-bit ASCII.

You should show your working.

Table 1

CharacterCharacter frequencyHuffman code
A60
N410
B2110
D11110
S11111
Total14
[3]

Data compression Questions

  1. GCSE
  2. /Computer Science
  3. /Data compression