Wednesday, April 1, 2009

Journal #10

File compression works by finding repeating elements and encoding them using a key.
eg: the three kids threw the ball through the theater.
Key: "th=2" and "thre=3"
2e 3e kids 3w 2e ball 2rough 2e 2eater. (saved 14 characters)

Encode the following sentence using a key that you design:

Jack Sprat would eat no fat, his wife would eat no lean. And so between the two of them they licked the platter clean.

Keys: "th=2" "no=3" "jack=4" "sprat=5" "woul=6"


4 5 6d eat 3 fat, his wife 6d eat 3 lean. And so between 2e two of 2em 2ey licked 2e platter clean

No comments:

Post a Comment