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

Function lm_init

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

Source from the content-addressed store, hash-verified

19290 * Initialize the "longest match" routines for a new zlib stream
19291 */
19292function lm_init(s) {
19293 s.window_size = 2 * s.w_size;
19294
19295 /*** CLEAR_HASH(s); ***/
19296 zero(s.head); // Fill with NIL (= 0);
19297
19298 /* Set the default configuration parameters:
19299 */
19300 s.max_lazy_match = configuration_table[s.level].max_lazy;
19301 s.good_match = configuration_table[s.level].good_length;
19302 s.nice_match = configuration_table[s.level].nice_length;
19303 s.max_chain_length = configuration_table[s.level].max_chain;
19304
19305 s.strstart = 0;
19306 s.block_start = 0;
19307 s.lookahead = 0;
19308 s.insert = 0;
19309 s.match_length = s.prev_length = MIN_MATCH - 1;
19310 s.match_available = 0;
19311 s.ins_h = 0;
19312}
19313
19314
19315function DeflateState() {

Callers 1

deflateResetFunction · 0.70

Calls 1

zeroFunction · 0.70

Tested by

no test coverage detected