Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best .NET Framework compression class?

Tags:

c#

compression

Yes, I know GZipStream or DeflateStream is the common ones in .NET Framework which handle compression/decompression.

I wish to have compress/decompress functions in my program, but

  1. I wish a .NET Framework C# one, not a 3rd party open source. I can't use because of those copyright restrictions in my program.

  2. GZipStream and DeflateStream are not so good. for e.g., GZipStream compress a file to 480KB while 7Zip compress the same file to the size of 57KB.

Does Microsoft have other good compression methods???

Thanks

like image 334
Jack Avatar asked May 10 '10 13:05

Jack


1 Answers

GZipStream and DeflateStream are specifically intended for compressed streams, not general compression of files for storage.

Other than those classes, compression is not built into .NET. If you want high-quality compression you will have to go to a third party library. Check out http://www.7-zip.org/sdk.html for an open-source 7zip library.

like image 185
Dave Swersky Avatar answered Sep 19 '22 15:09

Dave Swersky