mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-09 12:16:42 -04:00
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:
parent
69a7ca07fd
commit
8d4a5ae15c
@ -3004,21 +3004,21 @@ libdeflate_alloc_compressor(int compression_level)
|
|||||||
#if SUPPORT_NEAR_OPTIMAL_PARSING
|
#if SUPPORT_NEAR_OPTIMAL_PARSING
|
||||||
case 10:
|
case 10:
|
||||||
c->impl = deflate_compress_near_optimal;
|
c->impl = deflate_compress_near_optimal;
|
||||||
c->max_search_depth = 30;
|
c->max_search_depth = 35;
|
||||||
c->nice_match_length = 50;
|
c->nice_match_length = 75;
|
||||||
c->p.n.num_optim_passes = 2;
|
c->p.n.num_optim_passes = 2;
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
c->impl = deflate_compress_near_optimal;
|
c->impl = deflate_compress_near_optimal;
|
||||||
c->max_search_depth = 60;
|
c->max_search_depth = 70;
|
||||||
c->nice_match_length = 80;
|
c->nice_match_length = 150;
|
||||||
c->p.n.num_optim_passes = 3;
|
c->p.n.num_optim_passes = 3;
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
default:
|
default:
|
||||||
c->impl = deflate_compress_near_optimal;
|
c->impl = deflate_compress_near_optimal;
|
||||||
c->max_search_depth = 100;
|
c->max_search_depth = 150;
|
||||||
c->nice_match_length = 133;
|
c->nice_match_length = DEFLATE_MAX_MATCH_LEN;
|
||||||
c->p.n.num_optim_passes = 4;
|
c->p.n.num_optim_passes = 4;
|
||||||
break;
|
break;
|
||||||
#endif /* SUPPORT_NEAR_OPTIMAL_PARSING */
|
#endif /* SUPPORT_NEAR_OPTIMAL_PARSING */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user