code: func (r *DB) idx(h int) int {
  	if h < int(r.base) {
  		return tooSmall
  	}
  	if int(h) >= int(r.base)+len(r.attrs) {
  		return tooLarge
  	}
  	return h - int(r.base)
  }
docs: // idx returns the idx into attrs corresponding to attr a.
  // If h is too small, idx returns tooSmall (-1).
  // If h is too large, idx returns tooLarge (-2).