private int findIndex(byte value) {
		if (children.length == 0) {
			return 0;
		}

		int left = 0;
		int right = children.length;

		while (right >= left) {
			int mid = (left + right) / 2;
			if (mid >= children.length) {
				return mid;
			}
			ByteTrieNode<T> child = children[mid];
			byte id = transformByte(child.getId());
			if (id == value) {
				return mid;
			}
			else if (id < value) {
				left = mid + 1;
			}
			else {
				right = mid - 1;
			}
		}
		return left;
	}
Use binary search to find the index where the value is
(or should be, in case of add).
@param value the byte value
@return the index (from 0 to length of children, inclusive)
Ghidra/Features/Base/src/main/java/ghidra/util/search/trie/ByteTrieNode.java