@Override
    public int compareTo(StreamOffsetRange o) {
        int res = Long.compare(this.streamId, o.streamId);
        if (res != 0)
            return res;
        res = Long.compare(this.startOffset, o.startOffset);
        return res == 0 ? Long.compare(this.endOffset, o.endOffset) : res;
    }
StreamOffsetRange represents <code>[startOffset, endOffset)</code> in the stream.
s3stream/src/main/java/com/automq/stream/s3/metadata/StreamOffsetRange.java