Here you can find the source of decompress(byte[] bytes)
public static byte[] decompress(byte[] bytes) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.*; import java.util.zip.InflaterInputStream; public class Main { public static byte[] decompress(byte[] bytes) throws IOException { try (InputStream in = new InflaterInputStream(new ByteArrayInputStream(bytes))) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] buffer = new byte[4096]; int len; while ((len = in.read(buffer)) > 0) { baos.write(buffer, 0, len); }//from ww w . j av a 2 s . c o m return baos.toByteArray(); } catch (IOException e) { throw new AssertionError(e); } } }