 
     init(bootstrap: [[Int]]) {
         // Fills the 'lengths' array with numerous HuffmanLengths from a 'bootstrap'.
-        var lengths: [HuffmanLength] = []
+        var lengths: [[Int]] = []
         var start = bootstrap[0][0]
         var bits = bootstrap[0][1]
         for pair in bootstrap[1..<bootstrap.count] {

            let endbits = pair[1]
            if bits > 0 {
                lengths.append(contentsOf:
                    (start..<finish).map { HuffmanLength(code: $0, bits: bits) })
            }
            start = finish
            bits = endbits
        }
        // Sort the lengths' array to calculate symbols correctly.
        lengths.sort()

        func reverse(bits: Int, in symbol: Int) -> Int {
            // Auxiliarly function, which generates reversed order of bits in a number.

        }

        // Calculate maximum amount of leaves possible in a tree.
        self.leafCount = Int(pow(Double(2), Double(lengths.last![1] + 1)))
        // Create a tree (array, actually) with all leaves equal nil.
        self.tree = Array(repeating: nil, count: leafCount)

