2

I am trying to read a zip file, in java, using java "1.8.0_92" (the latest supported version for my OS.

Unfortunately, I am getting an exception:

invalid CEN header (bad compression method)

When I use the *nix (actually OS X) file command to analyse the file I get the detail:

Zip archive data, at least v2.1 to extract

Is there a third-party unzip library I can use that is capable of reading this version of zip file?

Pshemo
  • 122,468
  • 25
  • 185
  • 269
Andy
  • 523
  • 6
  • 20

1 Answers1

1

According Zip page on wikipedia, version 2.1 of ZIP format specification added support to Deflate64 compression:

2.1: (1996) Deflate64 compression

There is unresolved feature request for Apache Commons Compress. At this time, as I know, the only library supporting this is net.sf.sevenzipjbinding, but it is only wrapper to 7-Zip. Feature request for Apache Commons Compress is resolved now, you can use it.

Related question: Java Compression Library To Support Deflate64

Bedla
  • 4,789
  • 2
  • 13
  • 27