Code Comments
Programming Forum and web based access to our favorite programming groups.Hello! I read that the Lzw algorithm doesn't add his dictionnary to the compressed file. If it's true, i wonder how he could decompress the file! If it reads the chain "AA" and that it put it in the dictionnary with the value "259", he can't guess that "259" = "AA"... So how does it work? thanks for your answers!
Post Follow-up to this message"Flaway" <iwantutospamme@thx.com> wrote in message news:426d14a4$0$14392$626a14ce@news.free.fr... > Hello! > > I read that the Lzw algorithm doesn't add his dictionnary to the compressed > file. > If it's true, i wonder how he could decompress the file! > > If it reads the chain "AA" and that it put it in the dictionnary with the > value "259", he can't guess that "259" = "AA"... > So how does it work? > > thanks for your answers! If the first open dictionary entry is 259, the compressor knows the first new string "AA" is entry 259. The decompressor gets the "A" (single characters aren't encoded) followed by another "A" or a string that starts with that letter and IT knows the first open dictionary entry - 259 - gets to be "AA". Pretty succinct.
Post Follow-up to this messagesorry for my english and thanks for your explanation =)
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.