func (zw *Writer) Close() error {
	if err := zw.Flush(); err != nil {
		return err
	}

	for {
		result := C.ZSTD_endStream(zw.cs, zw.outBuf)
		ensureNoError("ZSTD_endStream", result)
		if err := zw.flushOutBuf(); err != nil {
			return err
		}
		if result == 0 {
			return nil
		}
	}
}
// Close finalizes the compressed stream and flushes all the compressed data
// to the underlying writer.
//
// It doesn't close the underlying writer passed to New* functions.
Close finalizes the compressed stream and flushes all the compressed data
to the underlying writer.

It doesn't close the underlying writer passed to New* functions.
// Close finalizes the compressed stream and flushes all the compressed data // to the underlying writer . // // It doesn ' t close the underlying writer passed to New * functions .
func (zw *Writer) Close() error {
	if err := zw.Flush(); err != nil {
		return err
	}
	for {
		result := C.ZSTD_endStream(zw.cs, zw.outBuf)
		ensureNoError("ZSTD_endStream", result)
		if err := zw.flushOutBuf(); err != nil {
			return err
		}
		if result == 0 {
			return nil
		}
	}
}
func ( zw * Writer ) Close ( ) error { if err := zw . Flush ( ) ; err != nil { return err } for { result := C . ZSTD_endStream ( zw . cs , zw . outBuf ) ensureNoError ( " " , result ) if err := zw . flushOutBuf ( ) ; err != nil { return err } if result == 0 { return nil } } }
Close finalizes the compressed stream and flushes all the compressed data
to the underlying writer.
Close finalizes the compressed stream and flushes all the compressed data to the underlying writer .