public static byte[] decompress(byte buffer[]) throws IOException { byte result[] = new byte[Byteconvert.convertInt(buffer, 8)]; inflater.setInput(buffer, 12, buffer.length - 12); try { inflater.inflate(result); } catch (DataFormatException e) { throw new IOException(); } inflater.reset(); return result; }