Here you can find the source of Decompress(byte[] bytes)
public static String Decompress(byte[] bytes) throws Exception
//package com.java2s; import java.io.ByteArrayOutputStream; import java.util.zip.Inflater; public class Main { public static String Decompress(byte[] bytes) throws Exception { Inflater decompressor = new Inflater(); decompressor.setInput(bytes);//from w ww .ja va2 s . co m // Create an expandable byte array to hold the decompressed data ByteArrayOutputStream bos = new ByteArrayOutputStream(bytes.length); byte[] buffer = new byte[1024]; try { while (true) { int count = decompressor.inflate(buffer); if (count > 0) { bos.write(buffer, 0, count); } else if (count == 0 && decompressor.finished()) { break; } else { throw new RuntimeException("Bad zip data, size: " + bytes.length); } } } finally { decompressor.end(); } bos.close(); return bos.toString("UTF-16LE"); } }