public final static byte[] decompress(byte[] bytes) throws Exception {
Inflater decompressor = new Inflater();
decompressor.setInput(bytes);
ByteArrayOutputStream bos = new ByteArrayOutputStream(bytes.length);
byte[] buffer = new byte[1024];
while (!decompressor.finished()) {
int cnt = decompressor.inflate(buffer);
bos.write(buffer, 0, cnt);
}
bos.close();
return bos.toByteArray();