public static DiskRangeList findUpperBound(DiskRangeList ranges, long offset) {
    while (ranges.getEnd() <= offset) {
      if (ranges.next.getOffset() < ranges.getEnd()) {
        throwRangesError(ranges, offset, offset);
      }
      ranges = ranges.next;
    }
    return ranges;
  }
Finds compressed offset in a stream and makes sure iter points to its position.
     This may be necessary for obscure combinations of compression and encoding boundaries.
ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java