diff options
author | Mika Lindqvist <postmaster@raasu.org> | 2016-03-25 17:56:41 +0200 |
---|---|---|
committer | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2017-01-30 11:50:58 +0100 |
commit | e80a18b6e9b4d20f1721025f32026e068f6d234b (patch) | |
tree | 143d699e5aad7bca79403570cf9dd3225b8f09b3 /deflate_medium.c | |
parent | 5e3255ce2dfd3429cf604d5a5d7c0160a46c837e (diff) |
Use bulk_insert_str when adding more than one byte.
** Partial merge of this commit, based on f8ad48ab17571c730b743c925f0e13ff83cf487f
Excluding changes to fill_window_sse.c, deflate.c and deflate_p.h
Diffstat (limited to 'deflate_medium.c')
-rw-r--r-- | deflate_medium.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/deflate_medium.c b/deflate_medium.c index 731b8a2..c5d39aa 100644 --- a/deflate_medium.c +++ b/deflate_medium.c @@ -112,9 +112,13 @@ static void insert_match(deflate_state *s, struct match match) { match.match_length = 0; s->ins_h = s->window[match.strstart]; if (match.strstart >= 1) - UPDATE_HASH(s, s->ins_h, match.strstart+2-MIN_MATCH); +#ifndef NOT_TWEAK_COMPILER + bulk_insert_str(s, match.strstart + 2 - MIN_MATCH, MIN_MATCH - 2); +#else + insert_string(s, match.strstart + 2 - MIN_MATCH); #if MIN_MATCH != 3 -#warning Call UPDATE_HASH() MIN_MATCH-3 more times +#warning Call insert_string() MIN_MATCH-3 more times +#endif #endif /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not * matter since it will be recomputed at next deflate call. |