code: public long getApproximateOffsetOf(Slice key)
      {
          BlockIterator iterator = indexBlock.iterator();
          iterator.seek(key);
          if (iterator.hasNext()) {
              BlockHandle blockHandle = BlockHandle.readBlockHandle(iterator.next().getValue().input());
              return blockHandle.getOffset();
          }
  
          // key is past the last key in the file.  Approximate the offset
          // by returning the offset of the metaindex block (which is
          // right near the end of the file).
          return metaindexBlockHandle.getOffset();
      }
docs: Given a key, return an approximate byte offset in the file where
  the data for that key begins (or would begin if the key were
  present in the file).  The returned value is in terms of file
  bytes, and so includes effects like compression of the underlying data.
  For example, the approximate offset of the last key in the table will
  be close to the file length.