MCPcopy Create free account
hub / github.com/RsyncProject/rsync / init_block

Function init_block

zlib/trees.c:405–417  ·  view source on GitHub ↗

=========================================================================== * Initialize a new block. */

Source from the content-addressed store, hash-verified

403 * Initialize a new block.
404 */
405local void init_block(deflate_state *s)
406{
407 int n; /* iterates over tree elements */
408
409 /* Initialize the trees. */
410 for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0;
411 for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0;
412 for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
413
414 s->dyn_ltree[END_BLOCK].Freq = 1;
415 s->opt_len = s->static_len = 0L;
416 s->sym_next = s->matches = 0;
417}
418
419#define SMALLEST 1
420/* Index within the heap array of least frequent node in the Huffman tree */

Callers 2

_tr_initFunction · 0.85
trees.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected