mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-08-03 17:56:17 -04:00
deflate_compress: don't use far len 3 matches in lazy compressor
It's usually not worth using length 3 matches with a large offset.
This commit is contained in:
parent
7e0242d04f
commit
4b7e9029d1
@ -2122,7 +2122,9 @@ deflate_compress_lazy(struct libdeflate_compressor * restrict c,
|
||||
c->max_search_depth,
|
||||
next_hashes,
|
||||
&cur_offset);
|
||||
if (cur_len < DEFLATE_MIN_MATCH_LEN) {
|
||||
if (cur_len < DEFLATE_MIN_MATCH_LEN ||
|
||||
(cur_len == DEFLATE_MIN_MATCH_LEN &&
|
||||
cur_offset > 8192)) {
|
||||
/* No match found. Choose a literal. */
|
||||
deflate_choose_literal(c, *in_next, &litrunlen);
|
||||
observe_literal(&c->split_stats, *in_next);
|
||||
|
Loading…
x
Reference in New Issue
Block a user