zip 3.0 不向后兼容 zip 2.3.1?

Ted*_*ist 2 compression

我有两个文件,一个是用 zip 2.3.1 生成的,另一个是用 zip 3.0 生成的。两者都是同一目录的 zip。这是两个文件及其大小:

1.7G from-2.3.1.zip  
1.7G from-3.0.zip
Run Code Online (Sandbox Code Playgroud)

我的计划是将我的系统转换为新的 zip,这样我就可以创建更大的 zip 文件,例如最大 3 GB 左右。

但是,我担心的是,当我使用稍旧版本的 unzip 解压缩这些文件时,当我尝试解压缩使用 zip 3.0 创建的 zip 时会出现错误。

$ unzip -t from-2.3.1.zip > /dev/null  # NO Errors
$ unzip -t from-3.0.zip > /dev/null
warning [from-3.0.zip]:  76 extra bytes at beginning or within zipfile
  (attempting to process anyway)
error [from-3.0.zip]:  reported length of central directory is
  -76 bytes too long (Atari STZip zipfile?  J.H.Holm ZIPSPLIT 1.1
  zipfile?).  Compensating...
error:  expected central file header signature not found (file #67358).
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)
$ 
Run Code Online (Sandbox Code Playgroud)

我担心的原因是,如果我转向 zip 3.0,我将迫使我的下游用户全部升级到较新版本的 unzip,例如,因为 unzip 6.0 可以无误地解压这两个文件。

这种异常并非在所有情况下都会发生,所以我不确定它的全部范围。

有什么建议?我是否以某种方式错误地构建了 zip 3.0?

谢谢。

Der*_*rfK 6

不同之处在于Zip64文件格式,它是为了能够压缩更大的文件而引入的。较旧的实用程序(例如 Windows XP 的文件资源管理器)不理解它。

就 Linux 而言,Debian Stable至少unzip 6.0自2011 年发布以来就包含在内(更改日志称于 2004年发布并于 2009 年发布)所以我个人的意见是,如果你“强迫”你的用户升级,你是帮他们一个忙。zip 3.0aunzip 6.00