Search code examples
windows-phone-7deflatesharpziplibcompression

How to decompress deflate stream (not gzip) using SharpZipLib?


I am working on an app on Windows Phone and trying to get data from a web server by HTTP GET method, and the content-encoding field in the response indicates that the data was compressed by deflate algorithm.

I found the useful library SharpZipLib, which can deal with gzip stream with GZipInputStream, but it does not work for deflate stream.

How can I depress the stream using SharpZipLib? Or is there any other way to deal with that?

Thanks a lot!


Solution

  • Don't know how you can achieve this with SharpZipLib, but you do have another choice and that is DotNetZip that has a DeflateStream all packed and ready to use here!

    Furthermore, AFAIK, DotNetZip is Ms-Pl licensed so it can be used in commercial applications, SharpZipLib (GPL) can't!