| 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 (* fill_window) (deflate_state *s); |
| 13 | Pos (* insert_string) (deflate_state *const s, const Pos str, unsigned int count); |
| 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 | }; |
| 18 | |
| 19 | ZLIB_INTERNAL extern __thread struct functable_s functable; |
| 20 | |
| 21 | |
| 22 | #endif |
| 23 | |