GZipStream decompression performance is poor

后端 未结 4 1384
予麋鹿
予麋鹿 2021-01-13 10:31

I have a .NET 2.0 WinForms app that connects to a backend WAS server. I am using GZipStream to decode data coming back from a HttpWebRequest call made to the server. The d

相关标签:
4条回答
  • 2021-01-13 10:37

    I'll drop my three cents to the subject, just to notify C#-users that a 7Zip seems to expose its API in plain C#. I think you all know the 7Zip tool quite well, and at least for me, regardless of how well- or ill- designed its API is --- knowing that is a big help in terms of better performance of handling ZIP files/streams.

    ref: http://www.splinter.com.au/compressing-using-the-7zip-lzma-algorithm-in/

    0 讨论(0)
  • 2021-01-13 10:44

    DotNetZip has a GZipStream class that can be used as a drop-in replacement for the System.IO.Compression.GZipStream.

    DotNetZip is free.

    NB: If you are only doing GZipStream, then you need the Ionic.Zlib.dll, not the Ionic.Zip.dll.

    0 讨论(0)
  • 2021-01-13 10:50

    Sorry to not answer your question directly, but have you looked at SharpZip yet? I found it much easier to use than Gzip. If you have trouble solving your current problem, perhaps it would perform the task better.

    http://www.icsharpcode.net/OpenSource/SharpZipLib/

    0 讨论(0)
  • 2021-01-13 11:00

    Try first loading the data into a MemoryStream and then decompress the MemoryStream...

    0 讨论(0)
提交回复
热议问题