From 057cb92782b5107beb3f7738c4544ce84de653e1 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 31 Dec 2021 16:04:49 -0600 Subject: [PATCH] deflate_compress: slightly decrease max_search_depth for levels 5-6 The new match scoring method in the lazy compressor has improved the compression ratio slightly. Therefore, for levels 5-6 decrease max_search_depth slightly to get a bit more performance. --- lib/deflate_compress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/deflate_compress.c b/lib/deflate_compress.c index 9b00fcd..5c8897e 100644 --- a/lib/deflate_compress.c +++ b/lib/deflate_compress.c @@ -2765,12 +2765,12 @@ libdeflate_alloc_compressor(int compression_level) break; case 5: c->impl = deflate_compress_lazy; - c->max_search_depth = 20; + c->max_search_depth = 16; c->nice_match_length = 30; break; case 6: c->impl = deflate_compress_lazy; - c->max_search_depth = 40; + c->max_search_depth = 35; c->nice_match_length = 65; break; case 7: