MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / init_block

Function init_block

ZLib/trees.c:409–422  ·  view source on GitHub ↗

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

(s)

Source from the content-addressed store, hash-verified

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