code: func (b *block) readFromUntil(r io.Reader, n int) error {
  	// quick case
  	if len(b.data) >= n {
  		return nil
  	}
  
  	// read until have enough.
  	b.reserve(n)
  	for {
  		m, err := r.Read(b.data[len(b.data):cap(b.data)])
  		b.data = b.data[0 : len(b.data)+m]
  		if len(b.data) >= n {
  			// TODO(bradfitz,agl): slightly suspicious
  			// that we're throwing away r.Read's err here.
  			break
  		}
  		if err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // readFromUntil reads from r into b until b contains at least n bytes
  // or else returns an error.