Performs a binary search on a sorted vec of IIDs to find the exact position
where the row == target_row. Assumes the vec is sorted by row numbers.
Returns Some(pos) if found, None if not present, or an error if any accessed IID lacks a row mapping.
Performs a binary search on a sorted vec of IIDs to find the leftmost insertion point
where the row >= target_row. Assumes the vec is sorted by row numbers.
Returns the insertion index or an error if any accessed IID lacks a row mapping.
Converts a usize to a compact String using base-62 bijective encoding (A-Z, a-z, 0-9).
This is more efficient than base-26 as it uses 62 symbols, resulting in shorter strings.
It’s repeatable: same input yields same output.
Handles usize::MAX as a special case to avoid overflow.