]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
deflate_rle: remove unnecessary check for too long matches
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Mon, 4 May 2026 19:38:27 +0000 (21:38 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 5 May 2026 10:21:26 +0000 (12:21 +0200)
deflate_rle.c

index b52fa2f0af3986ccd6c25607dff8ad32dcfb9cc5..058908c53332b09471137edf73487e321fffba63 100644 (file)
@@ -45,7 +45,6 @@ Z_INTERNAL block_state deflate_rle(deflate_state *s, int flush) {
             if (scan[0] == scan[1] && scan[1] == scan[2]) {
                 match_len = compare256_rle(scan, scan+3)+2;
                 match_len = MIN(match_len, s->lookahead);
-                match_len = MIN(match_len, STD_MAX_MATCH);
             }
             Assert(scan+match_len <= s->window + s->window_size - 1, "wild scan");
         }