Ejemplo n.º 1
0
 private void FillTables(IList <char> symbolsFrequency, IList <String> codes)
 {
     for (var i = 0; i < codes.Count; i++)
     {
         CodesTable.Add(symbolsFrequency[i], codes[i]);
         SymbolsTable.Add(codes[i], symbolsFrequency[i]);
     }
 }
Ejemplo n.º 2
0
        public CodesTable AddCodesTable(string name, string title = "")
        {
            var item = new CodesTable(GenDataBase)
            {
                GenObject = GenDataBase.Root.CreateGenObject("CodesTable"),
                Name      = name,
                Title     = title
            };

            CodesTableList.Add(item);
            return(item);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Huffman compression processor algorithm.
 /// </summary>
 public HuffmanStream()
 {
     _table = new CodesTable();
     _tree  = new BitTree(_table);
 }