1 | /* functable.h -- Struct containing function pointers to optimized functions |
2 | * Copyright (C) 2017 Hans Kristian Rosbach |
3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ |
5 | |
6 | #ifndef FUNCTABLE_H_ |
7 | #define FUNCTABLE_H_ |
8 | |
9 | #include "deflate.h" |
10 | |
11 | struct functable_s { |
12 | void (* insert_string) (deflate_state *const s, const uint32_t str, uint32_t count); |
13 | Pos (* quick_insert_string)(deflate_state *const s, const uint32_t str); |
14 | uint32_t (* adler32) (uint32_t adler, const unsigned char *buf, size_t len); |
15 | uint32_t (* crc32) (uint32_t crc, const unsigned char *buf, uint64_t len); |
16 | void (* slide_hash) (deflate_state *s); |
17 | uint32_t (* compare258) (const unsigned char *src0, const unsigned char *src1); |
18 | uint32_t (* longest_match) (deflate_state *const s, Pos cur_match); |
19 | uint32_t (* chunksize) (void); |
20 | uint8_t* (* chunkcopy) (uint8_t *out, uint8_t const *from, unsigned len); |
21 | uint8_t* (* chunkcopy_safe) (uint8_t *out, uint8_t const *from, unsigned len, uint8_t *safe); |
22 | uint8_t* (* chunkunroll) (uint8_t *out, unsigned *dist, unsigned *len); |
23 | uint8_t* (* chunkmemset) (uint8_t *out, unsigned dist, unsigned len); |
24 | uint8_t* (* chunkmemset_safe) (uint8_t *out, unsigned dist, unsigned len, unsigned left); |
25 | }; |
26 | |
27 | Z_INTERNAL extern Z_TLS struct functable_s functable; |
28 | |
29 | #endif |
30 | |