具有SharpZipLib的C#-SharpZipLib与Winzip和XP的兼容性? [英] C# with SharpZipLib - Compatibility of SharpZipLib with Winzip and XP?

查看:130
本文介绍了具有SharpZipLib的C#-SharpZipLib与Winzip和XP的兼容性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 CSharpZipLib 库自动压缩某些文件.问题是生成的zip文件不适用于Winzip(8.1版)或XP的压缩文件夹. 确实适用于7zip.

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给出一个错误,指出该文件不是标准的Zip 2.0格式.

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

是否可以更改参数以使库以Winzip/XP兼容格式进行压缩?

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

推荐答案

在您的ZipOutputStream中进行设置:

Set this in your ZipOutputStream:

 UseZip64 = ICSharpCode.SharpZipLib.Zip.UseZip64.Off

Zip64与Windows XP压缩文件夹实用程序或WinZip不兼容.

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

自从我使用的版本以来,API显然已更改,该属性现在是枚举而不是布尔值.

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

这篇关于具有SharpZipLib的C#-SharpZipLib与Winzip和XP的兼容性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆