func (z *Writer) Close() error {
	if !z.Header.done {
		if err := z.writeHeader(); err != nil {
			return err
		}
	}

	if err := z.Flush(); err != nil {
		return err
	}

	if debugFlag {
		debug("writing last empty block")
	}
	if err := z.writeUint32(0); err != nil {
		return err
	}
	if !z.NoChecksum {
		checksum := z.checksum.Sum32()
		if debugFlag {
			debug("stream checksum %x", checksum)
		}
		if err := z.writeUint32(checksum); err != nil {
			return err
		}
	}
	return nil
}
func (z *Writer) Close() error {
	if !z.Header.done {
		if err := z.writeHeader(); err != nil {
			return err
		}
	}

	if err := z.Flush(); err != nil {
		return err
	}

	if debugFlag {
		debug("writing last empty block")
	}
	if err := z.writeUint32(0); err != nil {
		return err
	}
	if !z.NoChecksum {
		checksum := z.checksum.Sum32()
		if debugFlag {
			debug("stream checksum %x", checksum)
		}
		if err := z.writeUint32(checksum); err != nil {
			return err
		}
	}
	return nil
}
func ( z * Writer ) Close ( ) error { if ! z . Header . done { if err := z . writeHeader ( ) ; err != nil { return err } } if err := z . Flush ( ) ; err != nil { return err } if debugFlag { debug ( " " ) } if err := z . writeUint32 ( 0 ) ; err != nil { return err } if ! z . NoChecksum { checksum := z . checksum . Sum32 ( ) if debugFlag { debug ( " " , checksum ) } if err := z . writeUint32 ( checksum ) ; err != nil { return err } } return nil }
// Close closes the Writer, flushing any unwritten data to the underlying io.Writer, but does not close the underlying io.Writer.
Close closes the Writer flushing any unwritten data to the underlying io . Writer but does not close the underlying io . Writer .