1
Vote

SevenZipCompressor is Not Compressing big files

description

If i am compressing big files, Lib is throwing error. Error Details are as follows
 
The execution has failed due to the bug in the SevenZipSharp.
 
Please report about it to http://sevenzipsharp.codeplex.com/WorkItem/List.aspx, post the release number and attach the archive. at SevenZip.SevenZipBase.ThrowException(CallbackBase handler, Exception[] e) in D:\Work\RSS\Addons\Export\SevenZipSharp\SevenZip\Common.cs:line 330
at SevenZip.SevenZipBase.CheckedExecute(Int32 hresult, String message, CallbackBase handler) in D:\Work\RSS\Addons\Export\SevenZipSharp\SevenZip\Common.cs:line 357
at SevenZip.SevenZipCompressor.CompressStream(Stream inStream, Stream outStream, String password) in D:\Work\RSS\Addons\Export\SevenZipSharp\SevenZip\SevenZipCompressor.cs:line 1798
at Greypad.Reporting.Export.Native7z.NativeExportFilter7z.ProtectFile(String sourceFile, String destinationFile) in D:\Work\RSS\Addons\Export\Greypad.Reporting.Export.Native - Copy\NativeExportFilter7z.cs:line 290
at Greypad.Reporting.Export.Native7z.NativeExportFilter7z.ExportDocument(List1 documents, String fileName) in D:\Work\RSS\Addons\Export\Greypad.Reporting.Export.Native - Copy\NativeExportFilter7z.cs:line 193
at Greypad.Reporting.Export.ExportFilter.Export(List
1 documents, String fileName, Boolean showDialog) in D:\C# Source\RSS 4.4\Printsuite Checked In\PrintSuite Designer Sources\Greypad.Reporting\Export\ExportFilter.cs:line 278
at PNOAnalyzer.MainWindow.Analyze(String selectedPath) in D:\Work\Vendor Apps\VendorApplication\PNOAnalyzer\MainWindow.xaml.cs:line 141
 
And i have used following code to compress the file
 
SevenZipCompressor tmp = new SevenZipCompressor();
tmp.CompressStream(File.OpenRead(sourceFile), File.Create(destinationFile));

file attachments

comments

markhor wrote Dec 21, 2010 at 7:30 AM

Memory limit? Maximum compression level? The same seems to be here :)
Describe your environment, specify if 7-zip fails too or not, compression level, attach the "big files", etc.

janhansen wrote Feb 21, 2011 at 5:18 PM

Hi,

I have a similar problem: I tried to compress an xml file of 511 MB and got the mentioned exception - no, I won't try to attach that. Nearly the same file but "only" 474 MB big worked fine. I reduced the compression level from normal to low, then I could compress the big on too. 7zip itself made both with normal compression rate.

Regards,

Jan

wrote Oct 13, 2011 at 9:50 PM

Lumbra wrote Oct 13, 2011 at 9:50 PM

I've got the same issue:

The execution has failed due to the bug in the SevenZipSharp.
Please report about it to http://sevenzipsharp.codeplex.com/WorkItem/List.aspx, post the release number and attach the archive.
at SevenZip.SevenZipBase.ThrowException(CallbackBase handler, Exception[] e)
at SevenZip.SevenZipBase.CheckedExecute(Int32 hresult, String message, CallbackBase handler)
at SevenZip.SevenZipCompressor.CompressFilesEncrypted(Stream archiveStream, Int32 commonRootLength, String password, String[] fileFullNames)
at SevenZip.SevenZipCompressor.CompressFilesEncrypted(String archiveName, Int32 commonRootLength, String password, String[] fileFullNames)
at SevenZip.SevenZipCompressor.CompressFilesEncrypted(String archiveName, String password, String[] fileFullNames)

It happens if the compression level is set to normal or stronger for CompressionMethod.Lzma2 - using compression level = fast is working.
It happens if the compression level is set to maximum or stronger for CompressionMethod.Lzma - using compression level = normal is working.

CompressionMethod.BZip2- working
CompressionMethod.Deflate - not working
CompressionMethod.Deflate64 - not working


The sevenzip gui is compressing the file even at ultra setting.

Code snippet used to compress the file:


SevenZipCompressor mSevenZipCompressor = new SevenZipCompressor
                                           {
                                               ArchiveFormat = OutArchiveFormat.SevenZip,
                                               CompressionMethod = CompressionMethod.Lzma2,
                                               CompressionMode = CompressionMode.Create,
                                               DirectoryStructure = false,
                                               CompressionLevel = CompressionLevel.Normal
                                           };
mSevenZipCompressor.CompressFiles(outFile, mStrings);

wrote Feb 22, 2013 at 1:16 AM