 
         for i in stride(from: summarySuffixArray.count - 1, to: 1, by: -1) {
             let bytesIndex = summary.suffixOffsets[summarySuffixArray[i]]
-            let bucketIndex = state.input[bytesIndex].toInt()
+            let bucketIndex = state.input[bytesIndex]
             suffixOffsets[bucketTails[bucketIndex]] = bytesIndex
             bucketTails[bucketIndex] -= 1
         }


    }

    static func make(from bytes: [UInt8], with alphabetSize: Int) -> [Int] {
        let state = State(bytes: bytes, alphabetSize: alphabetSize)

        var guessedSuffixArray = guessLMSSort(state)


    private struct State {

        let input: [Int]
        let typemap: [SuffixType]
        let bucketSizes: [Int]
        let bucketHeads: [Int]
        let bucketTails: [Int]

        init(bytes: [Int], alphabetSize: Int) {
            self.input = bytes

            var typemap = Array(repeating: SuffixType.lType, count: bytes.count + 1) // Extra one for empty suffix.
