This preview shows page 1. Sign up to view the full content.
Unformatted text preview: are better
More frequent words are better
But most frequent words are short Runlength encoding
Runlength encoding Replace runs of the same character with the number of times to repeat the char. Example Encode: AAAAAAA > *A7
* = “attention… here comes a repeated character”
Example Decode: *A7BCC*D5*E4 > AAAAAAABCCDDDDDEEEE LempelZiv
LempelZiv Produce compressed files (.zip, .gzip) For full description, see http://www.cs.mcgill.ca/~cs251/OldCourses/1997/topic23/ or http://en.wikipedia.org/wiki/LZW Following gives intuition, and is simplification I will not play at tug o'war.
I'd rather play at hug(21,8)
o'war, Where everyone hugs
Instead of tugs,
Where everyone giggles
And rolls on the rug,
Where everyone kisses,
And everyone grins,
And everyone cuddles,
And everyone wins.
-Shel Silverstein Replace repetitious text with pointer back to where it first occurred Huffman Coding
Recall problem with: A 1
D 100 Q1: How to get UNAMBIGUOUS v...
View Full Document
This document was uploaded on 04/02/2014.
- Fall '09
- Computer Science