Here you can find the source of decompressByte(byte[] decompress)
public final static byte[] decompressByte(byte[] decompress) throws Exception
//package com.java2s; //License from project: Open Source License import java.io.ByteArrayOutputStream; import java.util.zip.Inflater; public class Main { public final static byte[] decompressByte(byte[] decompress) throws Exception { return decompressByte(decompress, 0); }/*from w w w . j a v a 2 s. c om*/ public final static byte[] decompressByte(byte[] decompress, int startInx) throws Exception { Inflater inflater = new Inflater(); inflater.setInput(decompress, startInx, decompress.length - startInx); ByteArrayOutputStream bos = new ByteArrayOutputStream(); byte[] buf = new byte[1024]; while (!inflater.finished()) { int count = inflater.inflate(buf); bos.write(buf, 0, count); } inflater.end(); buf = bos.toByteArray(); bos.close(); return buf; } }