PA2: LZ78/LZW Data Compression at University of Michigan - Prof. Sugih Jamin, Exams of Algorithms and Programming

A class agenda for a data compression lecture at the university of michigan. It covers the lz78/lzw encoding and decoding techniques using huffman tree and trie. The process of creating minheap, trie, and compressing code table, as well as the encoding and decoding methods.

Typology: Exams

Pre 2010

Uploaded on 09/02/2009

koofers-user-4sp-1
koofers-user-4sp-1 🇺🇸

5

(1)

10 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Discussion: N
o
The Universi
The
Universi
o
vember 7, 2007
ty of Michigan
ty
of
Michigan
1
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download PA2: LZ78/LZW Data Compression at University of Michigan - Prof. Sugih Jamin and more Exams Algorithms and Programming in PDF only on Docsity!

Discussion: No

The UniversiThe

Universi

o

vember 7, 2007

ty of Michiganty

of Michigan

Agenda

z

Questions on anything

z

Quick Huffman Review

z

PA2: LZ78/LZW

z

Specific questions

Quick Huffman Review

Review of what we need to do (remem1.) Create minheap class: can have <k2.) Create trie class3.) Read in input data (M&Ms) 4.) Put input data into minheap “keyed

  • This means lowest key at root

5.) Construct trie (keep pulling off the

  • Remember: have to put sub-trie b

6.) When trie is built, we can create the7.) Create compressed code table8.) For encoded data, just use the code

ber this is ONE way):

key,object> paird” by frequency

root of minheap to get pairs)

b

ack onto minheap sometimes!

e codes for each symbol e table to determine what goes where

PA2: LZ78/LZW Encoding

z

Encoding process

Quick review of exam question

PA2: LZ78/LZW Encoding

z

Magic Cookie: 16-bits

z

LZW: 0010

z

Original Sym Size: 8-bits (If ASCII,

l S

S

h

b

l

z

Initial Sym Size*: It is the symbol sstring=256 ,

then initial sym size =

Size will increase dynamically

Use trie to do the encoding

Reserve 2^k-1 symbol for transi

then 8-bits)

h ( f

f

d

ize you start with (If your first code

ition to next symbol size

PA2: LZ78/LZW Decoding

PA2: LZ78/LZW Encoding

z

Visit this website for issues regardinstrings

htt

k

l

http://marknelson.us/1989/10/

Strings are stored in a reveRetrieve characters and sto

Retrieve characters and stothem to get the string

g use of stack for getting the decoded 01/l

d

t

i

01/lzw-data-compression/ erse order in our string bufferore them in our stack buffer and popore them in our stack buffer and pop

Questions?

Any que

e

stions?