> Can anyone please tell me where I can find source code(preferably in C)of > LZ78 and LZW algorithms used for data compression.I need them desparately > for comparing with our implementation for a term project.Thanks in > anticipation. > ---Subo. These are far from complete sources, but are mainly illustrative of the algorithm. I strongly suggest that you not copy them, as these are not only freely available but are very findable using standard search engines. Since there are relatively few LZ78 examples, any use of these will stand out. Try: Programming.Source.Data Compression at: http://www.dc.ee/Files/Programm.Packing PDN: C/C++ programming at: http://jkracht.aye.net/pdncee/ The Simtel.Net MS-DOS Collection has lz C source code at: http://ftp.arnes.si/simtel.net/msdos/compress-pre-bydate.html The Gnu project also has C code that will _decompress_ LZW, but will not compress it. Their argument is that the patents cover compression only. Look at programs compress and gzip for starters. BSD also has the same constraints, of course. Source code that works similarly to Gnu is at: http://andrew2.andrew.cmu.edu/rfc/rfc1977.html And of course, you've already looked at the code snippets in the comp.compression faq, right? <RANT> The Unisys-patented algorithms have fallen into disfavor in the software community because of licensing costs that are insensitive to the type of application being deployed. Your professor would have done you a better service by requiring that you learn compression techniques that are outstripping LZ* in their usage. </RANT>
