Dictionary-Based Compression (LZW)
This key facts covers Dictionary-Based Compression (LZW) within Compression for GCSE Computer Science. Revise Compression in 3.3 Data Representation for GCSE Computer Science with 16 exam-style questions and 16 flashcards. This topic appears regularly enough that it should still be part of a steady revision cycle. It is section 5 of 12 in this topic. Use this key facts to connect the idea to the wider topic before moving on to questions and flashcards.
Topic position
Section 5 of 12
Practice
16 questions
Recall
16 flashcards
Dictionary-Based Compression (LZW)
How Dictionary Compression Works:
Build a dictionary of common patterns/phrases. Replace patterns with short codes.
Simple Example:
Text: "the cat sat on the mat the rat sat" Dictionary: 1 = "the " 2 = "sat " 3 = "at " Compressed: "1cat 2on 1m31r32" Original: 33 characters Compressed: ~17 characters + dictionary
Real Applications:
- ZIP files: Uses LZ77/DEFLATE algorithm
- GIF images: Uses LZW for color table compression
- PDF files: Text and object compression
- Works best: Text files, code, HTML (lots of repeated words/patterns)
Keep building this topic
Read this section alongside the surrounding pages in Compression. That gives you the full topic sequence instead of a single isolated revision point.
Practice Questions for Compression
Which statement correctly describes lossy compression?
Explain how run-length encoding (RLE) works to compress data.
Quick Recall Flashcards
16 questions on Compression — practise free
Instant marking, adaptive difficulty, and 16 spaced repetition flashcards. Free until your GCSEs.
Try PrepWise Free