Java tutorial
//package com.java2s; import java.io.*; import java.util.zip.*; public class Main { public static byte[] decompressGZIP(byte bytes[]) throws IOException { ByteArrayInputStream is = new ByteArrayInputStream(bytes); GZIPInputStream gzipis = new GZIPInputStream(is); ByteArrayOutputStream os = new ByteArrayOutputStream(); int i; while ((i = gzipis.read()) != -1) { os.write(i); } gzipis.close(); os.close(); return os.toByteArray(); } }