简体   繁体   中英

split and spanned not support error while zip file extraction in c#

While Zip file Extraction using ziparchival class in C#. It working fine for few files but files with size more than 1 GB it throwing "Split or spanned archives are not supported." I dont get what it mean. How to resolve it?

DotNetZip allows you to do this. From their documentation:

The library supports zip passwords, Unicode, ZIP64, stream input and output, AES encryption, multiple compression levels, self-extracting archives, spanned archives, and more.

With Dotnetzip library you can zip even more than 4 gb. Also a lot easer to use then working with filestreams and bytearrays.

using (ZipFile zip = new ZipFile()) {
    zip.CompressionLevel = CompressionLevel.BestCompression;
    zip.UseZip64WhenSaving = Zip64Option.Always;
    zip.BufferSize = 65536*8; //buffer size

    foreach (var file in filenames) {
        zip.AddFile(file);
    }
    zip.Save(outpath);
}

当您尝试提取在复制过程中损坏的 Zip 文件时,我已经看到此错误。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM