deflate_compress: strengthen levels 10-12 slightly

With deflate_compress_near_optimal(), some data benefits more than
originally thought from larger values of max_search_depth and
nice_match_length.  Some data even needs these parameters to be fairly
high for deflate_compress_near_optimal() to compress more than
deflate_compress_lazy2().  Bump these parameters up a bit.
This commit is contained in:
Eric Biggers 2021-12-31 16:04:49 -06:00
parent 69a7ca07fd
commit 8d4a5ae15c

View File

@ -3004,21 +3004,21 @@ libdeflate_alloc_compressor(int compression_level)
#if SUPPORT_NEAR_OPTIMAL_PARSING
case 10:
c->impl = deflate_compress_near_optimal;
c->max_search_depth = 30;
c->nice_match_length = 50;
c->max_search_depth = 35;
c->nice_match_length = 75;
c->p.n.num_optim_passes = 2;
break;
case 11:
c->impl = deflate_compress_near_optimal;
c->max_search_depth = 60;
c->nice_match_length = 80;
c->max_search_depth = 70;
c->nice_match_length = 150;
c->p.n.num_optim_passes = 3;
break;
case 12:
default:
c->impl = deflate_compress_near_optimal;
c->max_search_depth = 100;
c->nice_match_length = 133;
c->max_search_depth = 150;
c->nice_match_length = DEFLATE_MAX_MATCH_LEN;
c->p.n.num_optim_passes = 4;
break;
#endif /* SUPPORT_NEAR_OPTIMAL_PARSING */