I am able to compress up to 1 GB of the folder but I have to compress more than 10 GB.
string filePath = C:\Work; // path of the source file
private void compressFile(string filePath)
{
using (ZipFile zip = new ZipFile())
{
zip.AddDirectory(Path.Combine(filePath, "Demo"));
if (File.Exists(Path.Combine(filePath, "Demo.zip")))
{
File.Delete(Path.Combine(filePath, "Demo.zip"));
zip.CompressionLevel = Ionic.Zlib.CompressionLevel.BestCompression;
zip.Save(Path.Combine(filePath, "Demo.zip"));
}
zip.Save(Path.Combine(filePath, "Demo.zip"));
}
}