                 repeatPower <<= 1
                 continue
             } else if repeat_ > 0 {
-                buffer.append(Array(repeating: favourites[0], count: repeat_), count: repeat_)
+                buffer.append(contentsOf: Array(repeating: favourites[0], count: repeat_))
                 repeat_ = 0
             }
             if symbol == symbolsInUse - 1 {

            return pointers
        }

        func bwt(reverse data: Data, end: inout Int) -> Data {
            var reversed = Data()
            if data.count > 0 {
                let T = bwt(transform: data)
                for _ in 0..<data.count {
                    end = T[end]
                    reversed.append(data[end])
                }
            }
            return reversed
        }

        let nt = bwt(reverse: buffer, end: &pointer)

            }
        }

        func bwt(transform bytes: [UInt8]) -> [Int] {
            let sortedBytes = bytes.sorted()
            var base: [Int] = Array(repeating: -1, count: 256)
            for i in 0..<256 {
                base[i] = sortedBytes.index(of: UInt8(truncatingBitPattern: UInt(i))) ?? -1
            }

            var pointers: [Int] = Array(repeating: -1, count: bytes.count)
            for (i, char) in bytes.enumerated() {
                pointers[base[char.toInt()]] = i
                base[char.toInt()] += 1
