Java tutorial
//package com.java2s; //License from project: Apache License import com.google.common.io.ByteStreams; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.zip.GZIPInputStream; public class Main { public static byte[] gunzip(byte[] data) throws IOException { InputStream in = new GZIPInputStream(new ByteArrayInputStream(data)); ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteStreams.copy(in, out); return out.toByteArray(); } }