Compression using a Dictionary

This interactive demonstrates the concept of using a dictionary to compress text.

Using the input box below, enter a message. Then try and build a dictionary that compresses every character in the message.

How efficient is your dictionary? Are you compressing one character per dictionary entry, or many? What happens if you add additional text to your message, does your dictionary still compress all of the text?

Enter a message to compress:

Compressed Message:

The highlighted characters represent the characters that are coded in your dictionary.

Dictionary:

New dictionary entry: