         }
 
         let selectorsList = try computeSelectorsList()
-        let symbolsInUse = used.reduce(0) { $0 + ($1 ? 1 : 0) }
+        let symbolsInUse = used.filter { $0 }.count + 2
 
         func computeTables() throws -> [HuffmanTable] {
             var tables: [HuffmanTable] = []

        var t: HuffmanTable?

        while true {
            decoded -= 1
            if decoded <= 0 {
                decoded = 50

        }

        func bwt(transform data: Data) -> [Int] {
            // TODO: Check performance with and without sorting.
            let bytes = data.toArray(type: UInt8.self)
            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: data.count)
