code: func (ib *inputBuffer) copy(d []byte) int {
  	// TODO: check all call sites, maybe this can be made more efficient
  	return copy(ib.data, d)
  }
docs: // copy copies data d into buffer ib. copy grows destination if needed.