MCPcopy Create free account
hub / github.com/TruthHun/BookStack / init_block

Function init_block

static/word2md/mammoth.browser.js:22848–22859  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

22846 * Initialize a new block.
22847 */
22848function init_block(s) {
22849 var n; /* iterates over tree elements */
22850
22851 /* Initialize the trees. */
22852 for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }
22853 for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }
22854 for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }
22855
22856 s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;
22857 s.opt_len = s.static_len = 0;
22858 s.last_lit = s.matches = 0;
22859}
22860
22861
22862/* ===========================================================================

Callers 2

_tr_initFunction · 0.70
_tr_flush_blockFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected