func (zw *Writer) Flush() error {
	// Flush inBuf.
	for zw.inBuf.size > 0 {
		if err := zw.flushInBuf(); err != nil {
			return err
		}
	}

	// Flush the internal buffer to outBuf.
	for {
		result := C.ZSTD_flushStream(zw.cs, zw.outBuf)
		ensureNoError("ZSTD_flushStream", result)
		if err := zw.flushOutBuf(); err != nil {
			return err
		}
		if result == 0 {
			// No more data left in the internal buffer.
			return nil
		}
	}
}
// Flush flushes the remaining data from zw to the underlying writer.
Flush flushes the remaining data from zw to the underlying writer.
// Flush flushes the remaining data from zw to the underlying writer .
func (zw *Writer) Flush() error {
	for zw.inBuf.size > 0 {
		if err := zw.flushInBuf(); err != nil {
			return err
		}
	}
	for {
		result := C.ZSTD_flushStream(zw.cs, zw.outBuf)
		ensureNoError("ZSTD_flushStream", result)
		if err := zw.flushOutBuf(); err != nil {
			return err
		}
		if result == 0 {
			return nil
		}
	}
}
func ( zw * Writer ) Flush ( ) error { for zw . inBuf . size > 0 { if err := zw . flushInBuf ( ) ; err != nil { return err } } for { result := C . ZSTD_flushStream ( zw . cs , zw . outBuf ) ensureNoError ( " " , result ) if err := zw . flushOutBuf ( ) ; err != nil { return err } if result == 0 { return nil } } }
Flush flushes the remaining data from zw to the underlying writer.
Flush flushes the remaining data from zw to the underlying writer .
// Flush inBuf. // Flush the internal buffer to outBuf. // No more data left in the internal buffer.