Exampleencodeaaaaaaaa7

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: are better More frequent words are better But most frequent words are short Run­length encoding Run­length 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 Lempel­Ziv Lempel­Ziv 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. (12,7) 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 Huffman Coding Recall problem with: A 1 B 10 C 11 D 100 Q1: How to get UNAMBIGUOUS v...
View Full Document

This document was uploaded on 04/02/2014.

Ask a homework question - tutors are online