// flushChunk terminates the current chunk. The encoder will be reset
// to support the next chunk.
flushChunk terminates the current chunk. The encoder will be reset
to support the next chunk.
// flushChunk terminates the current chunk . The encoder will be reset // to support the next chunk .
func (w *Writer2) flushChunk() error {
	if w.written() == 0 {
		return nil
	}
	var err error
	if err = w.encoder.Close(); err != nil {
		return err
	}
	if err = w.writeChunk(); err != nil {
		return err
	}
	w.buf.Reset()
	w.lbw.N = maxCompressed
	if err = w.encoder.Reopen(&w.lbw); err != nil {
		return err
	}
	if err = w.cstate.next(w.ctype); err != nil {
		return err
	}
	w.ctype = w.cstate.defaultChunkType()
	w.start = cloneState(w.encoder.state)
	return nil
}
func ( w * Writer2 ) flushChunk ( ) error { if w . written ( ) == 0 { return nil } var err error if err = w . encoder . Close ( ) ; err != nil { return err } if err = w . writeChunk ( ) ; err != nil { return err } w . buf . Reset ( ) w . lbw . N = maxCompressed if err = w . encoder . Reopen ( & w . lbw ) ; err != nil { return err } if err = w . cstate . next ( w . ctype ) ; err != nil { return err } w . ctype = w . cstate . defaultChunkType ( ) w . start = cloneState ( w . encoder . state ) return nil }
flushChunk terminates the current chunk.
flushChunk terminates the current chunk .