Пример #1
0
        public HuffmanNode(string binaddr, string DHT = null)
        {
            if (DHT != null)
            {
                this.populateLists(DHT);
            }

            this.Level   = binaddr.Length;
            this.Address = binaddr;

            this.makeMeLeaf();

            if (!this.Leaf && this.Level < 16)
            {
                this.Left  = new HuffmanNode(binaddr + "0");
                this.Right = new HuffmanNode(binaddr + "1");
            }
        }
Пример #2
0
 public HuffmanTree(string DHT)
 {
     this.DHT  = DHT;
     this.tree = new HuffmanNode("", DHT);
 }