is there a built-in support in Groovy to handle Zip files (the groovy way)?
Or do i have to use Java\'s java.util.zip.ZipFile to process Zip files in Groovy ?
def zip(String s){ def targetStream = new ByteArrayOutputStream() def zipStream = new GZIPOutputStream(targetStream) zipStream.write(s.getBytes()) zipStream.close() def zipped = targetStream.toByteArray() targetStream.close() return zipped.encodeBase64() }