presto-parquet/src/main/java/io/prestosql/parquet/reader/MetadataReader.java/MetadataReader/firstOutsideRange
class MetadataReader:    private static int firstOutsideRange(byte[] bytes, int rangeStartInclusive, int rangeEndExclusive)
    {
        int offset = 0;
        while (offset < bytes.length && rangeStartInclusive <= bytes[offset] && bytes[offset] < rangeEndExclusive) {
            offset++;
        }
        return offset;
    }