summaryrefslogtreecommitdiff
path: root/deflate_medium.c
diff options
context:
space:
mode:
authorHans Kristian Rosbach <hk-git@circlestorm.org>2020-05-25 17:17:45 +0200
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-05-30 21:31:38 +0200
commitf690af1ed086465f3f216640d6be22566de6920c (patch)
tree4d142867468581107941a4874c7f12dbc9bb6643 /deflate_medium.c
parenta0fa24f92fddf638a3d064389199599d6b5e9a5b (diff)
Remove toofar checks now that we always hash 4 bytes, and the minimum
match length is thus also 4. (MIN_MATCH is still 3 for other reasons)
Diffstat (limited to 'deflate_medium.c')
-rw-r--r--deflate_medium.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/deflate_medium.c b/deflate_medium.c
index 21dcbe4..d0d8ed6 100644
--- a/deflate_medium.c
+++ b/deflate_medium.c
@@ -261,11 +261,6 @@ ZLIB_INTERNAL block_state deflate_medium(deflate_state *s, int flush) {
else
fizzle_matches(s, &current_match, &next_match);
}
-
- /* short matches with a very long distance are rarely a good idea encoding wise */
- /* distances 8193–16384 take 12 extra bits, distances 16385–32768 take 13 extra bits */
- if (next_match.match_length == 3 && (next_match.strstart - next_match.match_start) > 12000)
- next_match.match_length = 1;
s->strstart = current_match.strstart;
} else {