From: Hans Kristian Rosbach Date: Wed, 21 Feb 2024 13:05:29 +0000 (+0100) Subject: Inserting strings is not slow any longer, remove bypass in deflate_medium(). X-Git-Tag: 2.2.0~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=322753f36e833343ae030e499564691da15eef32;p=thirdparty%2Fzlib-ng.git Inserting strings is not slow any longer, remove bypass in deflate_medium(). --- diff --git a/deflate_medium.c b/deflate_medium.c index ae7c737e..ca334e4b 100644 --- a/deflate_medium.c +++ b/deflate_medium.c @@ -63,10 +63,8 @@ static void insert_match(deflate_state *s, struct match match) { return; } - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (match.match_length <= 16 * s->max_insert_length && s->lookahead >= WANT_MIN_MATCH) { + /* Insert new strings in the hash table. */ + if (s->lookahead >= WANT_MIN_MATCH) { match.match_length--; /* string at strstart already in table */ match.strstart++;