=========================================================================== * Initialize the "longest match" routines for a new zlib stream */
(s)
| 984 | * Initialize the "longest match" routines for a new zlib stream |
| 985 | */ |
| 986 | local void lm_init (s) |
| 987 | deflate_state *s; |
| 988 | { |
| 989 | s->window_size = (ulg)2L*s->w_size; |
| 990 | |
| 991 | CLEAR_HASH(s); |
| 992 | |
| 993 | /* Set the default configuration parameters: |
| 994 | */ |
| 995 | s->max_lazy_match = configuration_table[s->level].max_lazy; |
| 996 | s->good_match = configuration_table[s->level].good_length; |
| 997 | s->nice_match = configuration_table[s->level].nice_length; |
| 998 | s->max_chain_length = configuration_table[s->level].max_chain; |
| 999 | |
| 1000 | s->strstart = 0; |
| 1001 | s->block_start = 0L; |
| 1002 | s->lookahead = 0; |
| 1003 | s->match_length = s->prev_length = MIN_MATCH-1; |
| 1004 | s->match_available = 0; |
| 1005 | s->ins_h = 0; |
| 1006 | #ifndef FASTEST |
| 1007 | #ifdef ASMV |
| 1008 | match_init(); /* initialize the asm code */ |
| 1009 | #endif |
| 1010 | #endif |
| 1011 | } |
| 1012 | |
| 1013 | #ifndef FASTEST |
| 1014 | /* =========================================================================== |