code: func (bg *Writer) Flush() error {
  	if bg.closed {
  		return ErrClosed
  	}
  	if err := bg.Error(); err != nil {
  		return err
  	}
  
  	if bg.active.next == 0 {
  		return nil
  	}
  
  	var c *compressor
  	c, bg.active = bg.active, <-bg.waiting
  	bg.queue <- c
  	bg.qwg.Add(1)
  	go c.writeBlock()
  
  	return bg.Error()
  }
docs: // Flush writes unwritten data to the underlying io.Writer. Flush does not block.