Codepiko · Computer science: Text compression
Write it short with boxes
Goal: Write repeated pieces as boxes that look back, and open a code made of boxes.
Time: 30 min · You need: Pencil; sticky notes for class play
1. Open the code
Some letters are not written; there are empty boxes in their place. “↶ 13, 7” above a box means: go back 13 letters and copy 7. Start counting back from the letter just left of the box; a space (·) counts as a letter too. Follow the arrows and fill in the empty boxes.
2. Find the repeats
Find the pieces that were written before. Draw a box round each one, draw an arrow from the box to where the piece was first written, and write “how far back, how many letters” in the box. Then add up how many letters the boxes saved you from writing.
Letters saved:
3. Think
Write a short answer.
Why can you not write random letters like “kej vux bip moz zul fad” more briefly?
codepiko.com