code: func NewReader(r io.Reader, rd int) (*Reader, error) {
  	bg, err := bgzf.NewReader(r, rd)
  	if err != nil {
  		return nil, err
  	}
  	h, _ := sam.NewHeader(nil, nil)
  	br := &Reader{
  		r: bg,
  		h: h,
  
  		references: int32(len(h.Refs())),
  	}
  	err = br.h.DecodeBinary(br.r)
  	if err != nil {
  		return nil, err
  	}
  	br.lastChunk.End = br.r.LastChunk().End
  	return br, nil
  }
docs: // NewReader returns a new Reader using the given io.Reader
  // and setting the read concurrency to rd. If rd is zero
  // concurrency is set to GOMAXPROCS. The returned Reader
  // should be closed after use to avoid leaking resources.