| 19290 | * Initialize the "longest match" routines for a new zlib stream |
| 19291 | */ |
| 19292 | function 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 | |
| 19315 | function DeflateState() { |