I agree, would also recommend using Apache libs, we use e.g. the ZIP
classes that come with the ant lib in the Groovy distribution
(org.apache.tools.zip.*):
Here is a quickly sanitzed version of our code (disclaimer: Not
compiled/tested; Zip64Mode.Always is important if you expect larger files
MY first thought was “are you SURE it is a kosher Zip file?”
Sometimes one gets ‘odd’ gzip files masquerading as plain zip files.
Also, apparently “java.util.Zip does not support DEFLATE64 compression method.”
:
https://www.ibm.com/support/pages/zip-file-fails-route-invalid-compression-method-e
Hello Paul, and thanks again for taking a moment to look at this. I tried
as you suggested:
- - - - - - - - - -
import java.util.zip.ZipInputStream
def ff = session.get()
if (!ff) return
try {
ff = session.write(ff, { inputStream, outputStream ->
def zipInputStream = new ZipInputStrea