code: func NewWriterLevel(w io.Writer, level, wc int) (*Writer, error) {
  	if level < gzip.DefaultCompression || level > gzip.BestCompression {
  		return nil, fmt.Errorf("bgzf: invalid compression level: %d", level)
  	}
  	wc++ // We count one for the active compressor.
  	if wc < 2 {
  		wc = 2
  	}
  	bg := &Writer{
  		w:       w,
  		waiting: make(chan *compressor, wc),
  		queue:   make(chan *compressor, wc),
  	}
  	bg.Header.OS = 0xff // Set default OS to unknown.
  
  	c := make([]compressor, wc)
  	for i := range c {
  		c[i].Header = &bg.Header
  		c[i].level = level
  		c[i].waiting = bg.waiting
  		c[i].flush = make(chan *compressor, 1)
  		c[i].qwg = &bg.qwg
  		bg.waiting <- &c[i]
  	}
  	bg.active = <-bg.waiting
  
  	bg.wg.Add(1)
  	go func() {
  		defer bg.wg.Done()
  		for qw := range bg.queue {
  			if !writeOK(bg, <-qw.flush) {
  				break
  			}
  		}
  	}()
  
  	return bg, nil
  }
docs: // NewWriterLevel returns a new Writer using the specified compression level
  // instead of gzip.DefaultCompression. Allowable level options are integer
  // values between between gzip.BestSpeed and gzip.BestCompression inclusive.
  //
  // The number of concurrent write compressors is specified by wc.