Burrow-Wheeler decoding implementation.