1 / 38

LZW Encoding

LZW Encoding. The input message was taken from: http://www-mtl.mit.edu/Courses/6.095/notes/LZW-examples.html. Input. Send. LZW Encoding. SEND. 256. i. 105. t. 116. Dictionary. t. 116. Index. Word. Index. Word. y. 121. 0. 258. it. _. 32. …. 259. tt. b. 98. i. 32. _.

kamala
Download Presentation

LZW Encoding

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LZW Encoding The input message was taken from:http://www-mtl.mit.edu/Courses/6.095/notes/LZW-examples.html

  2. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  3. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  4. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  5. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  6. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  7. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  8. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  9. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  10. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  11. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  12. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  13. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  14. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin _bin n 110 STOP 257

  15. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  16. Input Send LZW Encoding SEND 256 i 105 t 116 Dictionary t 116 Index Word Index Word y 121 0 258 it _ 32 … 259 tt b 98 i 32 _ 260 ty t 258 … 261 y_ t 97 a 262 _b y 260 98 b 263 bi _ b 262 … 264 itt i 122 z 265 ty_ t 258 … 266 _bi _ 256 SEND 267 it_ b i 266 257 STOP 268 _bin n 110 STOP 257

  17. Input Send LZW Encoding SEND 256 i 105 t 116 t 116 y 121 Compression Achieved _ 32 b 98 Message Words Bits / word Total i Original 18 8 144 t 258 LZW message 14 9 126 t y 260 _ b 262 i t 258 _ b i 266 n 110 STOP 257

  18. LZW Decoding

  19. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  20. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  21. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  22. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  23. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  24. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  25. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  26. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  27. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  28. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  29. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  30. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  31. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  32. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  33. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  34. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  35. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  36. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  37. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

  38. Received Input LZW Decoding 256 SEND 105 i 116 t Dictionary 116 t Index Word Index Word 121 y 0 258 it 32 _ … 259 tt 98 b 258 i 32 _ 260 ty t … 261 y_ 260 t 97 a 262 _b y 98 b 263 bi 262 _ b … 264 itt 258 i 122 z 265 ty_ t … 266 _bi 266 _ 256 SEND 267 it_ b i 257 STOP 268 _bin 110 n 257 STOP

More Related