Here you can find the source of uncompress(byte[] b)
public static StringBuffer uncompress(byte[] b)
//package com.java2s; import java.util.zip.DataFormatException; import java.util.zip.Inflater; public class Main { public static StringBuffer uncompress(byte[] b) { StringBuffer retval = new StringBuffer(); Inflater infl = new Inflater(); infl.setInput(b);//from w ww . j a v a 2 s . c o m int countUncompressed; byte[] buf = new byte[256]; while (true) { try { countUncompressed = infl.inflate(buf); for (int i = 0; i < countUncompressed; i++) { retval.append((char) buf[i]); } if (countUncompressed < buf.length) { break; } } catch (DataFormatException dfe) { break; } } infl.end(); return retval; } }