code: public void finishSynch() throws IOException {
  		if (finishing != null) {
  			finishing.blockException(0);
  			return;
  		}
  		finishing = new SynchronizationPoint<>();
  		try {
  			AsyncWork<Integer, IOException> lastWrite = writeOps.getLastPendingOperation();
  			if (lastWrite != null) {
  				lastWrite.blockException(0);
  			}
  			deflater.finish();
  			if (!deflater.finished()) {
  				byte[] writeBuf = new byte[8192];
  				do {
  					int nb = deflater.deflate(writeBuf, 0, writeBuf.length);
  					if (nb <= 0) break;
  					output.writeSync(ByteBuffer.wrap(writeBuf, 0, nb));
  				} while (!deflater.finished());
  			}
  			finishing.unblock();
  		} catch (IOException e) {
  			finishing.error(e);
  			throw e;
  		}
  	}
docs: Indicates that no more data will be compressed and flushes remaining compressed data to the output.