compress3_CMU_Lempel_Ziv

compress3_CMU_Lempel_Ziv - Source Carnegie Mellon...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Source Carnegie Mellon University, USA Course: Algorithms in Real-Word, 15853, Fall, 2000 http://www.cs.cmu.edu/afs/cs/academic/class/15853-f00/slides/compress3.ppt Posted by: Saad Qaisar, NUST, Pakistan. 15-853 Page1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
15-853 Page2 15-583:Algorithms in the Real World Data Compression III Lempel-Ziv algorithms Burrows-Wheeler Introduction to Lossy Compression
Background image of page 2
15-853 Page3 Lempel-Ziv Algorithms LZ77 (Sliding Window) Variants: LZSS (Lempel-Ziv-Storer-Szymanski) Applications: gzip , Squeeze, LHA, PKZIP, ZOO LZ78 (Dictionary Based) Variants: LZW (Lempel-Ziv-Welch), LZC (Lempel-Ziv-Compress) Applications: compress , GIF, CCITT (modems), ARC, PAK Traditionally LZ77 was better but slower, but the gzip version is almost as fast as any LZ78.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
15-853 Page4 LZ77: Sliding Window Lempel-Ziv Dictionary and buffer “windows” are fixed length and slide with the cursor On each step: Output (p,l,c) p = relative position of the longest match in the dictionary l = length of longest match c = next char in buffer beyond longest match Advance window by l + 1 a a c a a c a b c a b a b a c Dictionary (previously coded) Lookahead Buffer Cursor
Background image of page 4
15-853 Page5 LZ77: Example a a c a a c a b c a b a a a c (0,0,a) a a c a a c a b c a b a a a c (1,1,c) a a c a a c a b c a b a a a c (3,4,b) a a c a a c a b c a b a a a c (3,3,a) a a c a a c a b c a b a a a c (1,2,c) Dictionary (size = 6) Longest match Next character
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
15-853 Page6 LZ77 Decoding Decoder keeps same dictionary window as encoder. For each message it looks it up in the dictionary and inserts a copy What if l > p? (only part of the message is in the dictionary.) E.g. dict = abcd , codeword = (2,9,e) Simply copy starting at the cursor for (i = 0; i < length; i++) out[cursor+i] = out[cursor-offset+i] Out = abcdcdcdcdcdc
Background image of page 6
15-853 Page7 LZ77 Optimizations used by gzip LZSS: Output one of the following formats
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}

Page1 / 26

compress3_CMU_Lempel_Ziv - Source Carnegie Mellon...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online