小于大约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)