← Text Compression (You Can Say That Again!)
Kindergarten–Grade 1 reading level
Text Compression (You Can Say That Again!)
Adapted with AI from the original open resource by CS Unplugged. Nothing is invented — only the reading level changes.
You Can Say That Again! — Making Words Shorter
What Is This About?
Computers do not have room for everything.
They need to save space.
This is called compression.
Compression means making words shorter.
The computer changes the words a little.
This is called coding.
Later, the computer changes them back.
This is called decoding.
Then the computer can hold more.
It can also send things faster on the Internet.
What You Will Learn
You will look for patterns in words.
You will learn how computers save space.
Let's Look at a Poem
Look at this poem called "The Rain."
Pitter patter
Pitter patter
Listen to the rain
Pitter patter
Pitter patter
On the window pane
Some words repeat.
"Pitter patter" comes back again.
We can draw a box around it.
The box points back to where it first was.
This saves space!
Try It Yourself
Some words are missing from a poem.
Can you fill them in?
Look at the box.
The arrow shows you where to look.
Now try this with your own poem.
Pick a poem you know.
Find the words that repeat.
Draw boxes around them.
Make arrows point back to where they first appeared.
Try poems like:
- Three Blind Mice
- Mary Mary Quite Contrary
- Hickory Dickory Dock
Challenge: Try to keep as few words as you can!
Hint: Leave lots of space on your paper.
You will need room for boxes and arrows.
Extra for Experts
Look at this word: Ban---
Some letters point back to earlier letters.
We can copy letters one by one, left to right.
Computers use numbers instead of boxes.
The word "Banana" can be written as:
Ban(2,3)
The "2" means: go back 2 letters.
The "3" means: copy 3 letters.
Ban---
Bana--
Banan-
Banana
Now try making your own compressed words!
Can your friends figure them out?
Short and Sweet
Here is a poem.
I know an old lady who swallowed a bird
How absurd! She swallowed a bird!
She swallowed the bird to catch the spider
That wriggled and jiggled
and tickled inside her
She swallowed the spider to catch the fly
I don't know why she swallowed a fly
Perhaps she'll die…
Pretend you are a computer.
Cross out any letters that already showed up before.
These letters do not need to be written twice.
See how many you can cross out!
Extra for Real Experts
Here is a longer story.
A computer found 1,633 letters it could cross out!
Can you find some too?
Remember: only cross out groups of 2 or more repeated letters.
(The story is about the Three Little Pigs and the Big Bad Wolf.)
Why Do We Do This?
Computers can hold much more than they used to.
But we still keep filling them up!
Computers store books, music, and movies.
Small computers, like phones, need to save space too.
Big files are slow to send on the Internet.
So we compress the data to make it smaller.
The computer does this by itself.
We just notice things go faster!
One way to compress is called LZ coding.
It was made by two smart professors long ago.
It points back to words we already used.
This can make files half as big!
You may have heard of "zip" files.
This uses the same idea.
It also helps pictures and modems work faster.
Some other ways give short codes to common letters.
Morse code works this way too.
Original licensed under CC BY-NC-SA 4.0. This adaptation is provided free by OER.ai.