示例#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);
 }