unsigned int orgstart;
};
-#define MAX_DIST2 ((1 << MAX_WBITS) - MIN_LOOKAHEAD)
-
static int tr_tally_dist(deflate_state *s, int distance, int length) {
return zng_tr_tally(s, distance, length);
}
n = *next;
/* step one: try to move the "next" match to the left as much as possible */
- limit = next->strstart > MAX_DIST2 ? next->strstart - MAX_DIST2 : 0;
+ limit = next->strstart > MAX_DIST(s) ? next->strstart - MAX_DIST(s) : 0;
match = s->window + n.match_start - 1;
orig = s->window + n.strstart - 1;
* At this point we have always match_length < MIN_MATCH
*/
- if (hash_head != 0 && s->strstart - hash_head <= MAX_DIST2) {
+ if (hash_head != 0 && s->strstart - hash_head <= MAX_DIST(s)) {
/* To simplify the code, we prevent matches with the string
* of window index 0 (in particular we have to avoid a match
* of the string with itself at the start of the input file).
/* Find the longest match, discarding those <= prev_length.
* At this point we have always match_length < MIN_MATCH
*/
- if (hash_head != 0 && s->strstart - hash_head <= MAX_DIST2) {
+ if (hash_head != 0 && s->strstart - hash_head <= MAX_DIST(s)) {
/* To simplify the code, we prevent matches with the string
* of window index 0 (in particular we have to avoid a match
* of the string with itself at the start of the input file).