=========================================================================== * Initialize the "longest match" routines for a new zlib stream */
| 1097 | * Initialize the "longest match" routines for a new zlib stream |
| 1098 | */ |
| 1099 | local void lm_init (deflate_state *s) |
| 1100 | { |
| 1101 | s->window_size = (ulg)2L*s->w_size; |
| 1102 | |
| 1103 | CLEAR_HASH(s); |
| 1104 | |
| 1105 | /* Set the default configuration parameters: |
| 1106 | */ |
| 1107 | s->max_lazy_match = configuration_table[s->level].max_lazy; |
| 1108 | s->good_match = configuration_table[s->level].good_length; |
| 1109 | s->nice_match = configuration_table[s->level].nice_length; |
| 1110 | s->max_chain_length = configuration_table[s->level].max_chain; |
| 1111 | |
| 1112 | s->strstart = 0; |
| 1113 | s->block_start = 0L; |
| 1114 | s->lookahead = 0; |
| 1115 | s->insert = 0; |
| 1116 | s->match_length = s->prev_length = MIN_MATCH-1; |
| 1117 | s->match_available = 0; |
| 1118 | s->ins_h = 0; |
| 1119 | #ifndef FASTEST |
| 1120 | #ifdef ASMV |
| 1121 | match_init(); /* initialize the asm code */ |
| 1122 | #endif |
| 1123 | #endif |
| 1124 | } |
| 1125 | |
| 1126 | #ifndef FASTEST |
| 1127 | /* =========================================================================== |