Code example for Deflater

Methods: deflatefinishsetInput

0
	 *            output buffer 
	 * @return the deflated data length 
	 */ 
	public static final int compress(byte[] input,byte[] output) {
		 
		Deflater compresser = new Deflater();
		compresser.setInput(input);
		compresser.finish();
		int totalCompressed=compresser.deflate(output);	
		return totalCompressed;
	} 
	 
	 
 
	/** 
	 * @param integer 
	 *            the integer to be transformed in byte 
	 * @return a byte array containing the integer 
	 * @throws IOException 
	 */