简体   繁体   中英

C# with SharpZipLib - Compatibility of SharpZipLib with Winzip and XP?

I am using the CSharpZipLib library to automatically zip some files. The problem is that the resulting zip file doesn't work with Winzip (version 8.1) or XP's compressed folders. It does work with 7zip.

Winzip gives an error that this file is not in the standard Zip 2.0 format .

Is there a parameter that I can change that would get the library to compress in a Winzip/XP compatible format?

Set this in your ZipOutputStream:

 UseZip64 = ICSharpCode.SharpZipLib.Zip.UseZip64.Off

Zip64 is not compatible with the Windows XP compressed folders utility or with WinZip.

Edit: apparently the API has changed since the version I'm using, the property is now an enum rather than a Boolean value.

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