Free compression library for C# which supports 7zip (LZMA) [closed]

谁说胖子不能爱 提交于 2019-11-26 17:59:39

问题


I have a program (written in C#) that reads/writes its data directly (direct file access without server) to firebird database files. For a better exchange I want to (un)compress them on import/export for a better exchange over the internet without the need of an external program to (un)compress them.

I know #ziplib which supports Zip, GZip, Tar and BZip2.

What else free compression libraries for C# do you know? Is there a .NET library which supports LZMA so i can read/write ".7z" files?


回答1:


There is a good article written by Peter Bromberg:

7Zip (LZMA) In-Memory Compression with C#

Shows a simple C# SevenZip.Compression.Lzma.SevenZipHelper class to enable high-compression of in-memory objects with C#. Adds a new 7Zip format LZMA Cookie Compression class to the previously published CookieCompression utility.




回答2:


7-zip has a free source code, public domain C# SDK for the LZMA algorithm:

http://www.7-zip.org/sdk.html




回答3:


You may try SevenZipSharp




回答4:


It seems to be quite a little known fact but .NET library includes packaging/compression API




回答5:


If you are writing individual files, then you could just treat it as a stream and use the inbuilt GZipStream / DeflateStream (although in some tests I did, #ZipLib out-performed the MS offering for both ratio and speed). Or there is inbuilt zip support somewhere in the framework. I don't know about LZMA, though.



来源:https://stackoverflow.com/questions/449998/free-compression-library-for-c-sharp-which-supports-7zip-lzma

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!