Huffman & ASCII Bit Calculations Flashcards
All 3 cards in this deck
How do you work out the number of bits needed to store uncompressed text in ASCII?
Number of characters 7, because ASCII uses 7 bits per character.
How do you work out the number of bits needed to store text compressed with Huffman coding?
For each character, multiply its frequency by the length of its code, then add these together.
How do you work out the number of bits saved by Huffman coding?
Bits saved = bits needed in 7-bit ASCII − bits needed using the Huffman codes.