code: public static final byte[] compress(byte[] data, int level) throws IOException {
  		final Deflater deflater = new Deflater(level, true);
  		deflater.setInput(data);
  		deflater.finish();
  		final byte[] buffer = new byte[data.length + 128];
  		final int length = deflater.deflate(buffer);
  		final byte[] compressed = new byte[length];
  		System.arraycopy(buffer, 0, compressed, 0, length);
  		return compressed;
  	}
docs: --- COMPRESSS / DECOMPRESS ---