compareRotationsFrom

private fnint compareRotationsFrom(const(ubyte)[] block, size_t i, size_t j, size_t startOffset) pure nothrow @nogc

Compare 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

blockThe data block.
iIndex of first rotation.
jIndex of second rotation.
startOffsetNumber 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.