bwtTransform
Perform the Burrows-Wheeler Transform on the input data.
The BWT works by:
- Conceptually creating all rotations of the input.
- Sorting these rotations lexicographically.
- Outputting the last character of each sorted rotation.
- Recording origPtr: the index where the original (unrotated) string
appears in the sorted list.
This implementation uses a combination of radix sort and introsort for efficient suffix array construction.
Parameters
input | The data to transform. |
Returns
BwtResult containing the transformed data and origPtr.