Here you can find the source of zipit(byte[] paramArrayOfByte)
private static byte[] zipit(byte[] paramArrayOfByte)
//package com.java2s; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.GZIPOutputStream; public class Main { private static byte[] zipit(byte[] paramArrayOfByte) { ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream(); try {/*from w w w .j a v a2 s .c om*/ GZIPOutputStream localGZIPOutputStream = new GZIPOutputStream( localByteArrayOutputStream); localGZIPOutputStream.write(paramArrayOfByte); localGZIPOutputStream.close(); return localByteArrayOutputStream.toByteArray(); } catch (IOException localIOException) { throw new RuntimeException(localIOException); } } }