 
     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] {

        }

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


        for length in lengths {
            symbol += 1
            // We sometimes need to make symbol to have length.bits bit length.
            let bits = length[1]
            if bits != loopBits {
                symbol <<= (bits - loopBits)
                loopBits = bits
            }
            // Then we need to reverse bit order of the symbol.
            var treeCode = reverse(bits: loopBits, in: symbol)
            // Finally, we put it at its place in the tree.
            var index = 0
            for _ in 0..<bits {
                let bit = treeCode & 1
                index = bit == 0 ? 2 * index + 1 : 2 * index + 2
                treeCode >>= 1
            }
            self.tree[index] = length[0]
        }
    }

