FACT++  1.0
void Huffman::Decoder::Build ( const TreeNode p,
uint64_t  bits = 0,
uint8_t  n = 0 
)
inline

Definition at line 271 of file huffman.h.

References Huffman::TreeNode::isLeaf, Huffman::TreeNode::one, Set(), Huffman::TreeNode::symbol, and Huffman::TreeNode::zero.

272  {
273  if (p.isLeaf)
274  {
275  Set(p.symbol, n, bits);
276  return;
277  }
278 
279  Build(*p.zero, bits, n+1);
280  Build(*p.one, bits | (1<<n), n+1);
281  }
void Set(uint16_t sym, uint8_t n=0, size_t bits=0)
Definition: huffman.h:248
void Build(const TreeNode &p, uint64_t bits=0, uint8_t n=0)
Definition: huffman.h:271

+ Here is the call graph for this function: