Here you can find the source of decompress(byte[] paramArrayOfByte)
public static byte[] decompress(byte[] paramArrayOfByte) throws Exception
//package com.java2s; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.util.zip.GZIPInputStream; public class Main { public static String decompress(String paramString) throws Exception { return new String(decompress(paramString.getBytes("utf-8")), "utf-8"); }// w w w. j av a2 s. c o m public static byte[] decompress(byte[] paramArrayOfByte) throws Exception { ByteArrayInputStream localByteArrayInputStream = new ByteArrayInputStream( paramArrayOfByte); GZIPInputStream localGZIPInputStream = new GZIPInputStream( localByteArrayInputStream); ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream(); byte[] arrayOfByte = new byte[1024]; for (;;) { int i = localGZIPInputStream.read(arrayOfByte, 0, 1024); if (i == -1) { localByteArrayInputStream.close(); localByteArrayOutputStream.flush(); localByteArrayOutputStream.close(); localGZIPInputStream.close(); return localByteArrayOutputStream.toByteArray(); } localByteArrayOutputStream.write(arrayOfByte, 0, i); } } }