I've wrote a small app that compresses files and deletes them using DotNetZip,
it achieved compressing files to 1.4 GB zips
probably zips larger then this it's crashing
here is the stacktrace I got:
at Ionic.Zip.ZipFile.Save()
at Ionic.Zip.ZipFile.Save(String fileName)
at CustomFileCompressor.Program.ParallelCompress(List`1 relevantFiles, Int32
zipYear, Int32 zipMonth, String outputFile) in d:\C#\CustomFileCompressor\Custom
FileCompressor\CustomFileCompressor\Program.cs:line 135
at CustomFileCompressor.Program.Main(String[] args) in d:\C#\CustomFileCompre
ssor\CustomFileCompressor\CustomFileCompressor\Program.cs:line 78
here is the compression code, I tried to split it to 1GB Zip files
line 78 is the one call the function below
line 78: ParallelCompress(FilesInMonth, zipYear, zipMonth, outFile);
static void ParallelCompress(List<FileInfo> relevantFiles, int zipYear, int zipMonth, string outputFile)
{
List<string> filesToZip = relevantFiles.Select(fi => fi.FullName).ToList();
using (ZipFile zip = new ZipFile())
{
string outputfile = string.Format(outputFile, zipYear, zipMonth);
zip.MaxOutputSegmentSize = 1024 * 1024;
zip.AddFiles(filesToZip, true, "");
zip.Save(outputfile);
}
}