我有一个确实已损坏的 zip 文件。它包含一个完好无损的文件,另一个文件为 0 字节且已损坏。但是当我在 Mac 上解压它时(在 Finder 中双击),它确实解压了,我能够看到文件。
当我尝试使用 Ubuntu 中的命令行解压缩它时,我得到了一个
zip@zip-test ~]# unzip test.zip
Archive: test.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of test.zip or
test.zip.zip, and cannot find test.zip.ZIP, period.
我也尝试过:
[zip@zip-test ~]# jar xvf test.zip
inflated: data-2014-07-25-08-55-10.gps
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:163)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:109)
at sun.tools.jar.Main.extractFile(Main.java:954)
at sun.tools.jar.Main.extract(Main.java:870)
at sun.tools.jar.Main.run(Main.java:260)
at sun.tools.jar.Main.main(Main.java:1167)
最后我尝试了
[zip@zip-test ~]# 7za x test.zip
7-Zip (A) [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,1 CPU)
Processing archive: test.zip
Error: Can not open file as archive
但是因为我可以在 Mac 上解压,所以似乎应该有某种方法可以强制解压包。还有什么其他方法可以尝试吗?
编辑:您可以在这里找到该文件:http://cl.ly/1n3G0z3q3G3u