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.
如果您正在编写单个文件,那么您可以将其视为流并使用内置的 GZipStream / DeflateStream(尽管在我所做的一些测试中,#ZipLib 在比率和速度方面都优于 MS 产品)。 或者框架中有内置的 zip 支持。 不过我不知道LZMA。
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.
发布评论
评论(5)
7-zip 有一个用于 LZMA 算法的免费源代码、公共域 C# SDK:
http://www .7-zip.org/sdk.html
7-zip has a free source code, public domain C# SDK for the LZMA algorithm:
http://www.7-zip.org/sdk.html
Peter Bromberg 写了一篇好文章:
7Zip (LZMA) 使用 C# 进行内存压缩
There is a good article written by Peter Bromberg:
7Zip (LZMA) In-Memory Compression with C#
您可以尝试 SevenZipSharp
You may try SevenZipSharp
这似乎是一个鲜为人知的事实,但 .NET 库包括 打包/压缩API
It seems to be quite a little known fact but .NET library includes packaging/compression API
如果您正在编写单个文件,那么您可以将其视为流并使用内置的
GZipStream
/DeflateStream
(尽管在我所做的一些测试中,#ZipLib 在比率和速度方面都优于 MS 产品)。 或者框架中有内置的 zip 支持。 不过我不知道LZMA。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.