Showing AQAChange board

Dictionary-Based Compression

Test yourself on Compression with exam style questions, marked instantly.

Flashcards that come back just before you would forget them.

A revision plan that remembers what you know and shows what to do next.

See which topics you have nailed and which need another look.

Quiz yourself on CompressionGet your flashcardsBuild my revision planTrack my progress

Dictionary-Based Compression

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: Use lossless compression to shrink files
  • GIF images: Use lossless compression for images with few colors
  • PDF files: Text and object compression
  • Works best: Text files, code, HTML (lots of repeated words/patterns)

Make this stick

Signing in gives access to all PrepWise features.

PrepWise is a trading name of A3M Quality Solutions Limited, registered in England and Wales, company number 14959172. Registered office: 202 Stroud Road, Gloucester, GL1 5LA. ICO registration ZC267069.