MCPcopy Create free account
hub / github.com/hoothin/UserScripts / init_block

Function init_block

Picviewer CE+/dist.user.js:10866–10877  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

10864 * Initialize a new block.
10865 */
10866function init_block(s) {
10867 var n; /* iterates over tree elements */
10868
10869 /* Initialize the trees. */
10870 for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }
10871 for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }
10872 for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }
10873
10874 s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;
10875 s.opt_len = s.static_len = 0;
10876 s.last_lit = s.matches = 0;
10877}
10878
10879
10880/* ===========================================================================

Callers 2

_tr_initFunction · 0.70
_tr_flush_blockFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected