Here you can find the source of uncompressByte(byte[] content)
public static byte[] uncompressByte(byte[] content) throws IOException
//package com.java2s; //License from project: Apache License import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.GZIPInputStream; public class Main { public static byte[] uncompressByte(byte[] content) throws IOException { return uncompress(content).toByteArray(); }/*from w w w.j a v a 2 s. c o m*/ public static ByteArrayOutputStream uncompress(byte[] content) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayInputStream in = new ByteArrayInputStream(content); GZIPInputStream gunzip = new GZIPInputStream(in); byte[] buffer = new byte[256]; int n; while ((n = gunzip.read(buffer)) >= 0) { out.write(buffer, 0, n); } return out; } }