else
fizzle_matches(s, ¤t_match, &next_match);
}
-
- /* short matches with a very long distance are rarely a good idea encoding wise */
- /* distances 8193–16384 take 12 extra bits, distances 16385–32768 take 13 extra bits */
- if (next_match.match_length == 3 && (next_match.strstart - next_match.match_start) > 12000)
- next_match.match_length = 1;
s->strstart = current_match.strstart;
} else {
#include "deflate_p.h"
#include "functable.h"
-/* ===========================================================================
- * Local data
- */
-
-#ifndef TOO_FAR
-# define TOO_FAR 4096
-#endif
-/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
-
/* ===========================================================================
* Same as deflate_medium, but achieves better compression. We use a lazy
* evaluation for matches: a match is finally adopted only if there is
s->match_length = functable.longest_match(s, hash_head);
/* longest_match() sets match_start */
- if (s->match_length <= 5 && (s->strategy == Z_FILTERED
-#if TOO_FAR <= 32767
- || (s->match_length == MIN_MATCH && s->strstart - s->match_start > TOO_FAR)
-#endif
- )) {
-
+ if (s->match_length <= 5 && (s->strategy == Z_FILTERED)) {
/* If prev_match is also MIN_MATCH, match_start is garbage
* but we will ignore the current match anyway.
*/