Gunzip.groovy

import java.util.zip.GZIPInputStream

INPUT_GZIP_FILE = "#VARIABLE"

byte[] buffer = new byte[1024]

GZIPInputStream gzis =
        new GZIPInputStream(new FileInputStream(INPUT_GZIP_FILE))

FileOutputStream out =
        new FileOutputStream(INPUT_GZIP_FILE.replace(".gz",""))

int len;
while ((len = gzis.read(buffer)) > 0) {
    out.write(buffer, 0, len)
}

gzis.close()
out.close()