                         minimumSelector = tableIndex
                     }
                 }
-                if table.bitSize(for: stats) < minimumSize {
+                if table.bitSize(for: stats) < minimumSize && tables.count < 6 {
                     tables.append(table)
                     tablesLengths.append(lengths.sorted { $0.symbol < $1.symbol }.map { $0.codeLength })
                     selectorList.append(tables.count - 1)

        // Add 'end of stream' symbol.
        symbolOut.append(maxSymbol + 1)

        // Huffman Coding
        let bitWriter = BitWriter(bitOrder: .straight)

        // First, we analyze data and create Huffman trees and selectors.
        // Then we will perform encoding itself.
        // These are separate stages because all information about trees is stored at the beginning of the block,

        }

        // Now, we perform encoding itself.
        // But first, we need to finish block header.
        bitWriter.write(number: 0, bitsCount: 1) // "Randomized".
        bitWriter.write(number: pointer, bitsCount: 24) // Original pointer (from BWT).

