code: func (idx *index) insertIDbyOffset(offset int64, id uint64) (overwritten bool) {
  	key := idx.lookupKey(offset)
  	hash := hashKey(key)
  	pos := hash & idx.mask
  
  	var dist uint64
  	for {
  		e := &idx.elems[pos]
  
  		// Exit if a matching or empty slot exists.
  		if e.hash == 0 {
  			e.hash, e.offset, e.id = hash, offset, id
  			return false
  		} else if bytes.Equal(idx.lookupKey(e.offset), key) {
  			e.hash, e.offset, e.id = hash, offset, id
  			return true
  		}
  
  		// Swap if current element has a lower probe distance.
  		d := idx.dist(e.hash, pos)
  		if d < dist {
  			hash, e.hash = e.hash, hash
  			offset, e.offset = e.offset, offset
  			id, e.id = e.id, id
  			dist = d
  		}
  
  		// Move position forward.
  		pos = (pos + 1) & idx.mask
  		dist++
  	}
  }
docs: // insertIDbyOffset writes to the RHH id-by-offset map.