小于约 16 MB 的内存流运行良好。但是在压缩大小超过 16MB 的内存流时出现错误(HResult = -2146233088)。我怎样才能让它工作?
我使用 SevenZipSharp.dll 版本 0.64.3890.29348
SevenZip.SevenZipCompressor compressor = new SevenZip.SevenZipCompressor();
compressor.CompressionMethod = SevenZip.CompressionMethod.Lzma2;
compressor.CompressionLevel = SevenZip.CompressionLevel.Ultra;
compressor.EncryptHeaders = false;
using (Stream output = File.Open(sFileName, FileMode.Create))
{
ms.Position = 0;
compressor.CompressStreamDictionary(new Dictionary<string, Stream> { { zipFileName, ms } }, output, "");
}
由于 SevenZipSharp 中的错误,执行失败。请向http://sevenzipsharp.codeplex.com/WorkItem/List.aspx报告,发布版本号并附上存档。
错误堆栈跟踪:
bei SevenZip.SevenZipBase.ThrowException(CallbackBase handler, Exception[] e) bei SevenZip.SevenZipBase.CheckedExecute(Int32 hresult, String message, CallbackBase handler) bei SevenZip.SevenZipCompressor.CompressStreamDictionary(Dictionary`2 streamDictionary, Stream archiveStream, String password) bei frmConfigSystem.bwExport_DoWork(对象发送者,DoWorkEventArgs e)