@Override
	public Address findBytes(long snap, AddressRange range, ByteBuffer data, ByteBuffer mask,
			boolean forward, TaskMonitor monitor) {
		// ProgramDB uses the naive method with some skipping, so here we go....
		// TODO: This could be made faster by skipping over non-initialized blocks
		// TODO: DFA method would be complicated by masks....
		int len = data.capacity();
		if (mask != null && mask.capacity() != len) {
			throw new IllegalArgumentException("data and mask must have same capacity");
		}
		if (len == 0 ||
			range.getLength() > 0 /*treat length unsigned*/ && range.getLength() < len) {
			return null;
		}

		// TODO: Could do better, but have to worry about viewport, too
		// This will reduce the search to ranges that have been written at any snap
		// We could do for this and previous snaps, but that's where the viewport comes in.
		// TODO: Potentially costly to pre-compute the set concretely
		AddressSet known = new AddressSet(
			stateMapSpace.getAddressSetView(Lifespan.ALL, s -> s == TraceMemoryState.KNOWN))
					.intersect(new AddressSet(range));
		monitor.initialize(known.getNumAddresses());
		for (AddressRange knownRange : known.getAddressRanges(forward)) {
			Address found = doFindBytesInRange(snap, knownRange, data, mask, forward, monitor);
			if (found != null) {
				return found;
			}
		}
		return null;
	}
Locate the soonest block entry for the given offset-snap pair

<p>
To qualify, the entry must have a snap greater than (or optionally equal to) that given and
an offset exactly equal to that given. That is, it is the earliest in time, but most follow
the given snap. Additionally, if the given snap is in scratch space, the found entry must
also be in scratch space.

@param loc the offset-snap pair
@param inclusive true to allow equal snap
@return the found entry, or null
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/memory/DBTraceMemorySpace.java