code: public synchronized long lookup(long offset) {
      Map.Entry<Long, Long> entry = terms.floorEntry(offset);
      return entry != null ? entry.getValue() : 0;
    }
docs: Looks up the term for the given offset.
  
  @param offset The offset for which to look up the term.
  @return The term for the entry at the given offset.