const u8 * const in_begin = in;
const u8 *in_next = in_begin;
struct lz_match *cache_ptr = c->match_cache;
- u32 next_hash = 0;
+ u32 next_hashes[2] = {};
u32 max_len = in_nbytes;
u32 nice_len = min(max_len, c->nice_match_length);
max_len,
nice_len,
c->max_search_depth,
- &next_hash,
+ next_hashes,
&best_len,
cache_ptr);
cache_ptr->length = cache_ptr - matches;
max_len,
nice_len,
c->max_search_depth,
- &next_hash);
+ next_hashes);
cache_ptr->length = 0;
cache_ptr->offset = *in_next++;
cache_ptr++;
if (compression_level < 30) {
c->impl = xpress_compress_greedy;
- c->max_search_depth = (compression_level * 24) / 16;
- c->nice_match_length = (compression_level * 48) / 16;
+ c->max_search_depth = (compression_level * 30) / 16;
+ c->nice_match_length = (compression_level * 60) / 16;
} else {
c->impl = xpress_compress_lazy;
- c->max_search_depth = (compression_level * 24) / 32;
- c->nice_match_length = (compression_level * 48) / 32;
+ c->max_search_depth = (compression_level * 30) / 32;
+ c->nice_match_length = (compression_level * 60) / 32;
/* xpress_compress_lazy() needs max_search_depth >= 2
* because it halves the max_search_depth when
&c->match_cache[max_bufsize * CACHE_RESERVE_PER_POS];
c->impl = xpress_compress_near_optimal;
- c->max_search_depth = (compression_level * 32) / 100;
- c->nice_match_length = (compression_level * 50) / 100;
+ c->max_search_depth = (compression_level * 28) / 100;
+ c->nice_match_length = (compression_level * 56) / 100;
c->num_optim_passes = compression_level / 40;
}
#endif /* SUPPORT_NEAR_OPTIMAL_PARSING */