小编Dut*_*t93的帖子

使用DotNetZIP无法压缩超过10 GB的大文件

我能够压缩最多1 GB的文件夹,但我必须压缩超过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"));               
       }      
    }
Run Code Online (Sandbox Code Playgroud)

c# dotnetzip

-1
推荐指数
1
解决办法
869
查看次数

标签 统计

c# ×1

dotnetzip ×1