A Constant-Space Comparison-Based Algorithm for Computing the Burrows-Wheeler Transform