demo-lzw - Princeton University • COS 226 • Algorithms...

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

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: Princeton University • COS 226 • Algorithms and Data Structures • Spring 2004 • Kevin Wayne • http://www.Princeton.EDU/~cos226 LZW Encoding The input message was taken from: • http://www-mtl.mit.edu/Courses/6.095/notes/LZW-examples.html 2 LZW Encoding Word _ a b z Index … 32 … 97 98 122 SEND … 256 STOP 257 … it Word tt ty y_ _b bi ty_ _bi it_ _bin 258 Index 259 260 261 262 263 265 266 267 268 itt 264 Dictionary 105 Send 116 116 121 32 98 258 260 i Input t t y _ b t t y _ 262 b i 258 t i _ 266 b i 110 n 257 STOP 256 SEND 3 LZW Encoding Word _ a b z Index … 32 … 97 98 122 SEND … 256 STOP 257 … it Word tt ty y_ _b bi ty_ _bi it_ _bin 258 Index 259 260 261 262 263 265 266 267 268 itt 264 Dictionary 105 Send 116 116 121 32 98 258 260 i Input t t y _ b t t y _ 262 b i 258 t i _ 266 b i 110 n 257 STOP 256 SEND 4 LZW Encoding Word _ a b z Index … 32 … 97 98 122 SEND … 256 STOP 257 … it Word tt ty y_ _b bi ty_ _bi it_ _bin 258 Index 259 260 261 262 263 265 266 267 268 itt 264 Dictionary 105 Send 116 116 121 32 98 258 260 i Input t t y _ b t t y _ 262 b i 258 t i _ 266 b i 110 n 257 STOP 256 SEND it 5 LZW Encoding Word _ a b z Index … 32 … 97 98 122 SEND … 256 STOP 257 … it Word tt ty y_ _b bi ty_ _bi it_ _bin 258 Index 259 260 261 262 263 265 266 267 268 itt 264 Dictionary 105 Send 116 116 121 32 98 258 260 i Input t t y _ b t t y _ 262 b i 258 t i _ 266 b i 110 n 257 STOP 256 SEND tt 6 LZW Encoding Word _ a b z Index … 32 … 97 98 122 SEND … 256 STOP 257 … it Word tt ty y_ _b bi ty_ _bi it_ _bin 258 Index 259 260 261 262 263 265 266 267 268 itt 264 Dictionary 105 Send 116 116 121 32 98 258 260 i Input t t y _ b t t y _ 262 b i 258 t i _ 266 b i 110 n 257 STOP 256 SEND ty 7 LZW Encoding Word _ a b z Index … 32 … 97 98 122 SEND … 256 STOP 257 … it Word tt ty y_ _b bi ty_ _bi it_ _bin 258 Index 259 260 261 262 263 265 266 267 268 itt 264 Dictionary 105 Send 116 116 121 32 98 258 260 i Input t t y _ b t t y _ 262 b i 258 t i _ 266 b i 110 n 257 STOP 256 SEND y_ 8 LZW Encoding Word _ a b z Index … 32 … 97 98 122 SEND … 256 STOP 257 … it Word tt ty y_ _b bi ty_ _bi it_ _bin 258 Index 259 260 261 262 263 265 266 267 268 itt 264 Dictionary 105 Send 116 116 121 32 98 258 260 i Input t t y _ b t t y _ 262 b i 258 t i _ 266 b i 110 n 257 STOP 256 SEND _b 9 LZW Encoding Word _ a b z Index … 32 … 97 98 122 SEND … 256 STOP 257 … it Word tt ty y_ _b bi ty_ _bi it_ _bin 258...
View Full Document

{[ snackBarMessage ]}

Page1 / 38

demo-lzw - Princeton University • COS 226 • Algorithms...

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

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