Huffman Coding (AQA GCSE Computer Science): Flashcards

📚Flashcards
Huffman Coding
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

14 cards from this deck

Show

Type of compression used by Huffman coding

Lossless data compression

Huffman: Frequent chars get ___ codes

Shorter

Data structure used in Huffman coding

Binary tree

Starting point of a Huffman tree

Root node

Huffman coding: Data loss?

None - it's lossless

First step in creating Huffman code

Count character frequencies

Key rule when building Huffman tree

Combine two lowest frequency nodes first

Frequency of new combined node in Huffman tree

Sum of children frequencies

Root node frequency should equal

Total character count

Binary code for left branches in Huffman tree

0 (right = 1)

How to find a character's Huffman code

Follow path from root to character, writing 0s and 1s

Huffman coding uses ___ encoding

Variable-length

Bits per character in ASCII encoding

8 bits

Huffman coding optimality

Most efficient variable-length encoding possible

Join 100,000+ GCSE students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.