Let us begin this section with a nursery rhyme:
Hickory dickory dock
The mouse ran up the clock
The clock struck one
The mouse ran down
Hickory dickory dock
How many characters (including spaces, end-of-line and new line characters) are there in this text?
Can you think of a way of reducing the number of characters in the message without losing any of its content? Let's see who can compress the message the most.
Think in terms of tokens that contain blocks of repeated text. How can the message be represented in its compressed form? How much space does the compressed message take up?
Why would compression be valuable? How many of you have made use of compressed material?
Now try compressing this text:
Bent double, like old beggars under sacks,
Knock-kneed, coughing like hags, we cursed through sludge,
Till on the haunting flares we turned our backs
And towards our distant rest began to trudge.
Men marched asleep. Many had lost their boots
But limped on, blood-shod. All went lame; all blind;
Drunk with fatigue; deaf even to the hoots
Of tired, outstripped Five-Nines that dropped behind.
(Wilfred Owen: Dulce et Decorum Est)