code: public void finish() throws IOException
      {
          ensureNotFinished();
          flushBufferedData();
          compressedBuffer[MAGIC_LENGTH] = (byte) (COMPRESSION_METHOD_RAW | compressionLevel);
          writeIntLE(0, compressedBuffer, MAGIC_LENGTH + 1);
          writeIntLE(0, compressedBuffer, MAGIC_LENGTH + 5);
          writeIntLE(0, compressedBuffer, MAGIC_LENGTH + 9);
          assert MAGIC_LENGTH + 13 == HEADER_LENGTH;
          out.write(compressedBuffer, 0, HEADER_LENGTH);
          finished = true;
          out.flush();
      }
docs: Same as {@link #close()} except that it doesn't close the underlying stream.
  This can be useful if you want to keep on using the underlying stream.