MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / init_block

Function init_block

zlib/trees.c:411–424  ·  view source on GitHub ↗

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

(s)

Source from the content-addressed store, hash-verified

409 * Initialize a new block.
410 */
411local void init_block(s)
412 deflate_state *s;
413{
414 int n; /* iterates over tree elements */
415
416 /* Initialize the trees. */
417 for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0;
418 for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0;
419 for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
420
421 s->dyn_ltree[END_BLOCK].Freq = 1;
422 s->opt_len = s->static_len = 0L;
423 s->last_lit = s->matches = 0;
424}
425
426#define SMALLEST 1
427/* 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