| 7200 | * Initialize the "longest match" routines for a new zlib stream |
| 7201 | */ |
| 7202 | function lm_init(s) { |
| 7203 | s.window_size = 2 * s.w_size; |
| 7204 | |
| 7205 | /*** CLEAR_HASH(s); ***/ |
| 7206 | zero(s.head); // Fill with NIL (= 0); |
| 7207 | |
| 7208 | /* Set the default configuration parameters: |
| 7209 | */ |
| 7210 | s.max_lazy_match = configuration_table[s.level].max_lazy; |
| 7211 | s.good_match = configuration_table[s.level].good_length; |
| 7212 | s.nice_match = configuration_table[s.level].nice_length; |
| 7213 | s.max_chain_length = configuration_table[s.level].max_chain; |
| 7214 | |
| 7215 | s.strstart = 0; |
| 7216 | s.block_start = 0; |
| 7217 | s.lookahead = 0; |
| 7218 | s.insert = 0; |
| 7219 | s.match_length = s.prev_length = MIN_MATCH - 1; |
| 7220 | s.match_available = 0; |
| 7221 | s.ins_h = 0; |
| 7222 | } |
| 7223 | |
| 7224 | |
| 7225 | function DeflateState() { |