MCPcopy Create free account
hub / github.com/F-Stack/f-stack / init_block

Function init_block

freebsd/contrib/zlib/trees.c:407–420  ·  view source on GitHub ↗

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

(s)

Source from the content-addressed store, hash-verified

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

Callers 2

_tr_initFunction · 0.70
trees.cFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected