It has always been broken and untested anyways.
unsigned int str = s->strstart - s->insert;
if (str >= 1)
functable.quick_insert_string(s, str + 2 - STD_MIN_MATCH);
-#if STD_MIN_MATCH != 3
- while (s->insert) {
- functable.quick_insert_string(s, str);
- str++;
- s->insert--;
- if (s->lookahead + s->insert < STD_MIN_MATCH)
- break;
- }
-#else
unsigned int count;
if (UNLIKELY(s->lookahead == 1)) {
count = s->insert - 1;
functable.insert_string(s, str, count);
s->insert -= count;
}
-#endif
}
/* If the whole input has less than STD_MIN_MATCH bytes, ins_h is garbage,
* but this is not important since only literal bytes will be emitted.
s->strstart += match_len;
} else {
s->strstart += match_len;
-#if STD_MIN_MATCH != 3
- functable.insert_string(s, s->strstart + 2 - STD_MIN_MATCH, STD_MIN_MATCH - 2);
-#else
functable.quick_insert_string(s, s->strstart + 2 - STD_MIN_MATCH);
-#endif
+
/* If lookahead < STD_MIN_MATCH, ins_h is garbage, but it does not
* matter since it will be recomputed at next deflate call.
*/
} else {
match.strstart += match.match_length;
match.match_length = 0;
+
if (match.strstart >= (STD_MIN_MATCH - 2))
-#if STD_MIN_MATCH != 3
- functable.insert_string(s, match.strstart + 2 - STD_MIN_MATCH, STD_MIN_MATCH - 2);
-#else
functable.quick_insert_string(s, match.strstart + 2 - STD_MIN_MATCH);
-#endif
+
/* If lookahead < WANT_MIN_MATCH, ins_h is garbage, but it does not
* matter since it will be recomputed at next deflate call.
*/