Free compression library for C# which supports 7zi

2019-01-10 10:21发布

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?

6条回答
Luminary・发光体
2楼-- · 2019-01-10 10:35

Beware: GZipStream has a size limitation of 4Gb

查看更多
何必那么认真
3楼-- · 2019-01-10 10:37

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.

查看更多
▲ chillily
4楼-- · 2019-01-10 10:48

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.

查看更多
▲ chillily
5楼-- · 2019-01-10 10:52

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

查看更多
成全新的幸福
6楼-- · 2019-01-10 10:53

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

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

查看更多
叼着烟拽天下
7楼-- · 2019-01-10 11:00
登录 后发表回答