I'm using ZipArchive in PHP to create an archive. It's been working fine for the best part of a year, but suddenly today with no apparent trigger it stopped working correctly.
The archive appears to be created successfully, it's about the right size, and it's not giving any errors or warnings. Using $ unzip archive.zip
on it appears to work. However, extracting it in our Java application (which has worked fine for about a year) fails with:
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)
Also in the creating of the archive, ZipArchive::close() is taking about 10 seconds, when it was previously instant.
Edit The size of the archive happened to be bigger than usual (28MB instead of usually ~15MB) which might explain the delay in ZipArchive::close(), but not why Java can't then decompress it?