MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / init_block

Function init_block

extern/zlib/src/trees.c:439–450  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

437 * Initialize a new block.
438 */
439local void init_block(deflate_state *s) {
440 int n; /* iterates over tree elements */
441
442 /* Initialize the trees. */
443 for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0;
444 for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0;
445 for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
446
447 s->dyn_ltree[END_BLOCK].Freq = 1;
448 s->opt_len = s->static_len = 0L;
449 s->sym_next = s->matches = 0;
450}
451
452/* ===========================================================================
453 * Initialize the tree data structures for a new zlib stream.

Callers 2

_tr_initFunction · 0.85
trees.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected