byte[] buf = new byte[COMPRESSION_BUFFER_LENGTH];
while (!deflater.finished()) {
int count = deflater.deflate(buf);
out.write(buf, 0, count);
}
deflater.end();
}
static void decompress(byte[] compressedData, DataOutput out) throws IOException {
Inflater inflater = new Inflater();
inflater.setInput(compressedData);