小於大約16 MB的內存運行正常。但是當壓縮大小超過16MB的內存流時,我得到一個錯誤(HResult = -2146233088)。我怎樣才能使它工作?SevenZipSharp CompressStreamDictionary錯誤
我用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的bug。 請將其報告給http://sevenzipsharp.codeplex.com/WorkItem/List.aspx,發佈版本號並附上存檔。
錯誤堆棧跟蹤:
貝SevenZip.SevenZipBase.ThrowException(CallbackBase處理程序,例外[] E) 貝SevenZip.SevenZipBase.CheckedExecute(的Int32 HRESULT,字符串消息,CallbackBase處理程序) 貝SevenZip.SevenZipCompressor.CompressStreamDictionary (Dictionary`2 streamDictionary,流archiveStream,字符串密碼) 貝frmConfigSystem.bwExport_DoWork(對象發件人,DoWorkEventArgs E)