FACT++  1.0
void Huffman::Decoder::Set ( uint16_t  sym,
uint8_t  n = 0,
size_t  bits = 0 
)
inline

Definition at line 248 of file huffman.h.

References i, isLeaf, nbits, Set(), and symbol.

Referenced by Set().

249  {
250  if (!lut)
251  lut = new Decoder[256];
252 
253  if (n>8)
254  {
255  lut[bits&0xff].Set(sym, n-8, bits>>8);
256  return;
257  }
258 
259  const int nn = 1<<(8-n);
260 
261  for (int i=0; i<nn; i++)
262  {
263  const uint8_t key = bits | (i<<n);
264 
265  lut[key].symbol = sym;
266  lut[key].isLeaf = true;
267  lut[key].nbits = n;
268  }
269  }
int i
Definition: db_dim_client.c:21
void Set(uint16_t sym, uint8_t n=0, size_t bits=0)
Definition: huffman.h:248
Decoder * lut
Definition: huffman.h:236
uint16_t symbol
Definition: huffman.h:232
uint8_t nbits
Definition: huffman.h:233

+ Here is the call graph for this function:

+ Here is the caller graph for this function: