 
         // Calculate maximum amount of leaves possible in a tree.
         self.leafCount = 1 << (lengths.last![1] + 1)
-        self.tree = Array(repeating: .leaf(-1), count: leafCount)
+        self.tree = Array(repeating: -1, count: leafCount)
 
         self.codingIndices = coding ? Array(repeating: [-1, -1], count: lengths.count) : []
 


class HuffmanTree {

    private enum HTNode {
        case leaf(Int)
        case branch(Set<Int>)
    }

    private var pointerData: DataWithPointer

    private var tree: [HTNode]
    private let leafCount: Int

    private let coding: Bool
    /// Special array for coding part. Index in array = symbol, value in array = index in tree.
    private var codingIndices: [[Int]]

    init(bootstrap: [[Int]], _ pointerData: inout DataWithPointer, _ coding: Bool = false) {
        self.coding = coding

                index = bit == 0 ? 2 * index + 1 : 2 * index + 2
                treeCode >>= 1
            }
            self.tree[index] = length[0]
        }
    }

