C# 与 SharpZipLib - SharpZipLib 与 Winzip 和 XP 的兼容性?

发布于 2024-08-05 06:26:41 字数 301 浏览 2 评论 0原文

我正在使用 CSharpZipLib 库自动压缩一些文件。问题是生成的 zip 文件不适用于 Winzip(版本 8.1)或 XP 的压缩文件夹。 它确实可以与 7zip 一起使用。

Winzip 给出错误,指出此文件不是标准 Zip 2.0 格式

是否有一个我可以更改的参数,可以让库以 Winzip/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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笑梦风尘 2024-08-12 06:26:41

在 ZipOutputStream 中进行设置:

 UseZip64 = ICSharpCode.SharpZipLib.Zip.UseZip64.Off

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

编辑:显然自我使用的版本以来 API 已经发生了变化,该属性现在是一个枚举而不是布尔值。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文