]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Use STD_MIN_MATCH instead of WANT_MIN_MATCH in deflate_slow for fast-zlib.
authorNathan Moinvaziri <nathan@nathanm.com>
Sun, 13 Jun 2021 21:59:32 +0000 (14:59 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 25 Jun 2021 18:09:14 +0000 (20:09 +0200)
deflate_slow.c

index 0cb40f5ca0801689a8500284a8b1ebc67ca330e6..a3af11bcfee4be86fc1053c3d974af8503bd7bc4 100644 (file)
@@ -68,8 +68,8 @@ Z_INTERNAL block_state deflate_slow(deflate_state *s, int flush) {
         /* If there was a match at the previous step and the current
          * match is not better, output the previous match:
          */
-        if (s->prev_length >= WANT_MIN_MATCH && match_len <= s->prev_length) {
-            unsigned int max_insert = s->strstart + s->lookahead - WANT_MIN_MATCH;
+        if (s->prev_length >= STD_MIN_MATCH && match_len <= s->prev_length) {
+            unsigned int max_insert = s->strstart + s->lookahead - STD_MIN_MATCH;
             /* Do not insert strings in hash table beyond this. */
 
             check_match(s, s->strstart-1, s->prev_match, s->prev_length);