By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,775 Members | 1,347 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,775 IT Pros & Developers. It's quick & easy.

Compression algorithm

P: n/a
I not really sure this is the right newsgroup so please excuse me if it
is not.

I am trying to create a simple compression algorithm using the LZW
system and I can find a lot of information on the general description of
it, but how exactly does the dictionary that is used work. Is it just
stored in an array or do you need to write it to a file so that it can
be used the next time you need to decompress a file. I would think it
would need to be stored in a file and then read into an array since if
you compressed the file and then shut down the program, would you not
lose everything in the dictionary and then not be able to decompress the
file? Any help would be appreciated.

Thanks,

Z.K.
May 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Z.K. wrote:
I am trying to create a simple compression algorithm using
the LZW system and I can find a lot of information on the
general description of it, but how exactly does the dictionary
that is used work. [...] I would think it would need to be
stored in a file and then read into an array since if you
compressed the file and then shut down the program, would
you not lose everything in the dictionary and then not be able
to decompress the file?


No, the decompression algorithm reconstructs the dictionary from the
compressed data.

Eq.
May 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.