public synchronized void writeTo(OutputStream out,CompressionLevel compressionLevel) throws IOException {
  if (compressPos == -1) {
    super.writeTo(out);
    bytesWritten=buf.length;
  }
 else {
    count=pos;
    out.write(buf,0,compressPos);
    bytesWritten=deflate(out,compressionLevel);
  }
}

public synchronized void writeTo ( OutputStream out , CompressionLevel compressionLevel ) throws IOException { if ( compressPos == - 1 ) { super . writeTo ( out ) ; bytesWritten = buf . length ; } else { count = pos ; out . write ( buf , 0 , compressPos ) ; bytesWritten = deflate ( out , compressionLevel ) ; } }
send buffer to the given stream . if markcomp was called , bytes after that mark will be compressed .
