public static AddressSet computeDiffsAddressSet(Address start, byte[] a, byte[] b) {
		if (a.length != b.length) {
			throw new IllegalArgumentException("Arrays must be the same length");
		}
		// A means of early parameter checking, and I'll need it later
		Address end = start.add(a.length - 1);

		AddressSet result = new AddressSet();

		Address diffStart = null;
		for (int i = 0; i < a.length; i++) {
			if (a[i] == b[i]) {
				if (diffStart != null) {
					result.add(diffStart, start.add(i - 1));
				}
			}
			else {
				if (diffStart == null) {
					diffStart = start.add(i);
				}
			}
		}
		if (diffStart != null) {
			result.add(diffStart, end);
		}
		return result;
	}
Compute the address set where two byte arrays differ, given a start address

@param start the address of the first byte in each array
@param a the first array
@param b the second array
@return the address set where the arrays differ
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/util/ByteArrayUtils.java