Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>For better compression you can use 7zip library. In this way:</p> </blockquote> <pre><code>public void AddToArchive(string fileToBeZipped, string zipDestination) { DirectoryInfo Di = new DirectoryInfo(zipDestination); StringBuilder sb_archiveFile = new StringBuilder(zipDestination + Path.DirectorySeparatorChar + Di.Name + @".7z"); string archiveFile = sb_archiveFile.ToString(); SevenZip.SevenZipCompressor compressor = new SevenZipCompressor(); Console.WriteLine("zip destination : " + Di.Name); if (!File.Exists(fileToBeZipped)) { Console.WriteLine("Appending {0} to Archive ", fileToBeZipped); compressor.CompressionMode = SevenZip.CompressionMode.Append; } else { Console.WriteLine("Creating {0} at Destination {1}....", fileToBeZipped, archiveFile); Console.WriteLine("CREATING:: "); compressor.CompressionMode = SevenZip.CompressionMode.Create; } compressor.CompressionLevel = CompressionLevel.Normal; compressor.CompressionMethod = CompressionMethod.Lzma; compressor.CompressionMode = CompressionMode.Append; compressor.CompressDirectory(zipDestination, archiveFile); compressor.CompressStream(streamer, streamer2); } </code></pre> <p>And call a method with: AddToArchive(inFolder, splitIntoDir);</p> <p>You can download a source code of 7zip <a href="http://www.codeproject.com/KB/DLL/cs_interface_7zip/7zIntf15.zip" rel="nofollow">here</a>.</p> <p>You can install a Nuget package for 7zip <a href="http://www.nuget.org/packages/SevenZipSharp/" rel="nofollow">here</a> for Visual Studio.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload