LZW compression?

Apr 12, 2009 at 2:14am
Hello everyone,

One area within computers which has always fascinated me is data compression. Recently I decided that I want to know more about it. I googled up for the simplest data compression algorithm that has general use, I found that such algorithm is the LZW algorithm.

Maybe I'm just dumb, but I'm having quite a hard time understanding it! I get the big picture, assigning codes to substrings found within a given file, placing those same codes in a dictionary and ouputing them to the compressed file whenever a found sub-string maches any of the sub-strings previously stored in the dictionary. I think I need to understand it better to make my own implementation, tough.

Can anyone try to explain me the LZW algorithm with more detail and, if it's not asking too much, try to give me some example code?

Thank you in advance and best regards,
~Deimos
Apr 12, 2009 at 4:14am
I can't explain compression for you because I have no clue how it works myself but, here is some example code.

http://www.codeproject.com/KB/recipes/LZWCompression.aspx
Apr 12, 2009 at 5:46pm
Thanks mate!
I still need to work on it a little more to get it, tough. :)

Best Regards
Topic archived. No new replies allowed.