@Override
	public byte readByte(long index) throws IOException {
		ensureBounds(index, 1);

		Entry<Long, Long> entry = offsetMap.floorEntry(index);
		long rangeStart = entry.getKey();
		long rangeOffset = index - rangeStart;
		long delegateRangeStart = entry.getValue();

		return (delegateRangeStart != -1)
				? delegate.readByte(delegateRangeStart + rangeOffset)
				: 0;
	}
Return the number of ranges.  Adjacent ranges that were merged
will count as a single range.

@return number of ranges
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/RangeMappedByteProvider.java