private ByteArrayOutputStream deflate(PngByteArrayOutputStream inflatedImageData, int strategy, int compression) throws IOException {
		final ByteArrayOutputStream deflatedOut = new ByteArrayOutputStream();
		final Deflater deflater = new Deflater(compression);
		deflater.setStrategy(strategy);

		try {
			final DeflaterOutputStream stream = new DeflaterOutputStream(deflatedOut, deflater);
			stream.write(inflatedImageData.get(), 0, inflatedImageData.len());
			stream.close();
		} finally {
			deflater.end();
		}

		return deflatedOut;
	}
private ByteArrayOutputStream deflate ( PngByteArrayOutputStream inflatedImageData , int strategy , int compression ) throws IOException { final ByteArrayOutputStream deflatedOut = new ByteArrayOutputStream ( ) ; final Deflater deflater = new Deflater ( compression ) ; deflater . setStrategy ( strategy ) ; try { final DeflaterOutputStream stream = new DeflaterOutputStream ( deflatedOut , deflater ) ; stream . write ( inflatedImageData . get ( ) , 0 , inflatedImageData . len ( ) ) ; stream . close ( ) ; } finally { deflater . end ( ) ; } return deflatedOut ; }
/*