void insert_string_acle(deflate_state *const s, const uint32_t str, uint32_t count);
Pos quick_insert_string_acle(deflate_state *const s, const uint32_t str);
-uint32_t update_hash_acle(deflate_state *const s, uint32_t h, uint32_t val);
+uint32_t update_hash_acle(uint32_t h, uint32_t val);
#endif
#ifdef ARM_SIMD
uint32_t adler32_fold_copy_sse42(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
void insert_string_sse42(deflate_state *const s, const uint32_t str, uint32_t count);
Pos quick_insert_string_sse42(deflate_state *const s, const uint32_t str);
-uint32_t update_hash_sse42(deflate_state *const s, uint32_t h, uint32_t val);
+uint32_t update_hash_sse42(uint32_t h, uint32_t val);
#endif
#ifdef X86_AVX2
static void lm_init (deflate_state *s);
Z_INTERNAL unsigned read_buf (PREFIX3(stream) *strm, unsigned char *buf, unsigned size);
-extern uint32_t update_hash_roll (deflate_state *const s, uint32_t h, uint32_t val);
+extern uint32_t update_hash_roll (uint32_t h, uint32_t val);
extern void insert_string_roll (deflate_state *const s, uint32_t str, uint32_t count);
extern Pos quick_insert_string_roll(deflate_state *const s, uint32_t str);
if (s->lookahead + s->insert >= STD_MIN_MATCH) {
unsigned int str = s->strstart - s->insert;
if (UNLIKELY(s->max_chain_length > 1024)) {
- s->ins_h = s->update_hash(s, s->window[str], s->window[str+1]);
+ s->ins_h = s->update_hash(s->window[str], s->window[str+1]);
} else if (str >= 1) {
s->quick_insert_string(s, str + 2 - STD_MIN_MATCH);
}
/* Type definitions for hash callbacks */
typedef struct internal_state deflate_state;
-typedef uint32_t (* update_hash_cb) (deflate_state *const s, uint32_t h, uint32_t val);
+typedef uint32_t (* update_hash_cb) (uint32_t h, uint32_t val);
typedef void (* insert_string_cb) (deflate_state *const s, uint32_t str, uint32_t count);
typedef Pos (* quick_insert_string_cb)(deflate_state *const s, uint32_t str);
functable.slide_hash(s);
}
-static uint32_t update_hash_stub(deflate_state* const s, uint32_t h, uint32_t val) {
+static uint32_t update_hash_stub(uint32_t h, uint32_t val) {
init_functable();
- return functable.update_hash(s, h, val);
+ return functable.update_hash(h, val);
}
/* functable init */
uint32_t (* longest_match_slow) (deflate_state *const s, Pos cur_match);
Pos (* quick_insert_string)(deflate_state *const s, uint32_t str);
void (* slide_hash) (deflate_state *s);
- uint32_t (* update_hash) (deflate_state *const s, uint32_t h, uint32_t val);
+ uint32_t (* update_hash) (uint32_t h, uint32_t val);
};
Z_INTERNAL extern struct functable_s functable;
* input characters, so that a running hash key can be computed from the
* previous key instead of complete recalculation each time.
*/
-Z_INTERNAL uint32_t UPDATE_HASH(deflate_state *const s, uint32_t h, uint32_t val) {
- (void)s;
+Z_INTERNAL uint32_t UPDATE_HASH(uint32_t h, uint32_t val) {
HASH_CALC(s, h, val);
return h & HASH_CALC_MASK;
}
* to cur_match). We cannot use s->prev[strstart+1,...] immediately, because
* these strings are not yet inserted into the hash table.
*/
- hash = s->update_hash(s, 0, scan[1]);
- hash = s->update_hash(s, hash, scan[2]);
+ hash = s->update_hash(0, scan[1]);
+ hash = s->update_hash(hash, scan[2]);
for (i = 3; i <= best_len; i++) {
- hash = s->update_hash(s, hash, scan[i]);
+ hash = s->update_hash(hash, scan[i]);
/* If we're starting with best_len >= 3, we can use offset search. */
pos = s->head[hash];
*/
scan_endstr = scan + len - (STD_MIN_MATCH+1);
- hash = s->update_hash(s, 0, scan_endstr[0]);
- hash = s->update_hash(s, hash, scan_endstr[1]);
- hash = s->update_hash(s, hash, scan_endstr[2]);
+ hash = s->update_hash(0, scan_endstr[0]);
+ hash = s->update_hash(hash, scan_endstr[1]);
+ hash = s->update_hash(hash, scan_endstr[2]);
pos = s->head[hash];
if (pos < cur_match) {