code: func (r *Reader) OffsetOf(key []byte) (offset int64, err error) {
  	r.mu.RLock()
  	defer r.mu.RUnlock()
  
  	if r.err != nil {
  		err = r.err
  		return
  	}
  
  	indexBlock, rel, err := r.readBlockCached(r.indexBH, true, true)
  	if err != nil {
  		return
  	}
  	defer rel.Release()
  
  	index := r.newBlockIter(indexBlock, nil, nil, true)
  	defer index.Release()
  	if index.Seek(key) {
  		dataBH, n := decodeBlockHandle(index.Value())
  		if n == 0 {
  			r.err = r.newErrCorruptedBH(r.indexBH, "bad data block handle")
  			return
  		}
  		offset = int64(dataBH.offset)
  		return
  	}
  	err = index.Error()
  	if err == nil {
  		offset = r.dataEnd
  	}
  	return
  }
docs: // OffsetOf returns approximate offset for the given key.
  //
  // It is safe to modify the contents of the argument after Get returns.