compareRotationsFrom
private fn
int compareRotationsFrom(const(ubyte)[] block, size_t i, size_t j,
size_t startOffset) pure nothrow @nogcCompare two rotations starting from a given offset.
This is useful when radix sort has already established that the first startOffset bytes are equal, so we can skip comparing them.
Uses memcmp for fast comparison of longer segments, with special handling for the circular nature of BWT rotations.
Parameters
block | The data block. |
i | Index of first rotation. |
j | Index of second rotation. |
startOffset | Number of bytes to skip (already known to be equal). |
Returns
-1 if rotation i < rotation j, 1 if rotation i > rotation j, 0 if equal.