public BitTree(HuffmanCodesTable table) { _table = table; _eos = HuffmanCodesTable.Eos; _root = new Node(false, null); BuildTree(table); }
public BitTree(HuffmanCodesTable table, bool isRequest) { _table = table; _isRequest = isRequest; _eos = _isRequest ? HuffmanCodesTable.ReqEos : HuffmanCodesTable.RespEos; _root = new Node(false, null); BuildTree(table); }
public HuffmanCompressionProcessor() { _requestTable = new HuffmanCodesTable(isRequest: true); _requestTree = new BitTree(_requestTable, true); _responseTable = new HuffmanCodesTable(isRequest: false); _responseTree = new BitTree(_responseTable, false); }
private void BuildTree(HuffmanCodesTable table) { foreach (var bits in table.HuffmanTable.Keys) { Add(bits); } Add(HuffmanCodesTable.Eos); }
private void BuildTree(HuffmanCodesTable table) { foreach (var bits in table.HuffmanTable.Keys) { Add(bits); } Add(_isRequest ? HuffmanCodesTable.ReqEos : HuffmanCodesTable.RespEos); }
public HuffmanCompressionProcessor() { _table = new HuffmanCodesTable(); _tree = new BitTree(_table); }