summaryrefslogtreecommitdiff
path: root/deflate_p.h
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2020-01-17 19:04:20 -0800
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-04-30 10:01:46 +0200
commit69bbb0d823771bc84ed1ba96381a91e06847c428 (patch)
treeb9f3732d273f20d898f03c5773635c7af6966aea /deflate_p.h
parent42aa81beafa2ea14cd780a9acf3359a0a09ca44b (diff)
Standardize insert_string functionality across architectures. Added unaligned conditionally compiled code for insert_string and quick_insert_string. Unify sse42 crc32 assembly between insert_string and quick_insert_string. Modified quick_insert_string to work across architectures.
Diffstat (limited to 'deflate_p.h')
-rw-r--r--deflate_p.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/deflate_p.h b/deflate_p.h
index 6853bce..b519d45 100644
--- a/deflate_p.h
+++ b/deflate_p.h
@@ -19,35 +19,6 @@ void check_match(deflate_state *s, IPos start, IPos match, int length);
void flush_pending(PREFIX3(stream) *strm);
/* ===========================================================================
- * Insert string str in the dictionary and set match_head to the previous head
- * of the hash chain (the most recent string with same hash key). Return
- * the previous length of the hash chain.
- * IN assertion: all calls to to INSERT_STRING are made with consecutive
- * input characters and the first MIN_MATCH bytes of str are valid
- * (except for the last MIN_MATCH-1 bytes of the input file).
- */
-
-static inline Pos insert_string_c(deflate_state *const s, const Pos str, unsigned int count) {
- Pos ret = 0;
- unsigned int idx;
-
- for (idx = 0; idx < count; idx++) {
- UPDATE_HASH(s, s->ins_h, str+idx);
-
- Pos head = s->head[s->ins_h];
- if (head != str+idx) {
- s->prev[(str+idx) & s->w_mask] = head;
- s->head[s->ins_h] = str+idx;
- if (idx == count - 1)
- ret = head;
- } else if (idx == count - 1) {
- ret = str + idx;
- }
- }
- return ret;
-}
-
-/* ===========================================================================
* Save the match info and tally the frequency counts. Return true if
* the current block must be flushed.
*/