* (except for the last MIN_MATCH-1 bytes of the input file).
*/
#ifdef X86_SSE4_2_CRC_HASH
-Pos insert_string_sse(deflate_state *const s, const Pos str, unsigned int count) {
+ZLIB_INTERNAL Pos insert_string_sse(deflate_state *const s, const Pos str, unsigned int count) {
Pos ret = 0;
unsigned int idx;
unsigned *ip, val, h;
static int deflateStateCheck (z_stream *strm);
static void slide_hash (deflate_state *s);
static block_state deflate_stored (deflate_state *s, int flush);
-block_state deflate_fast (deflate_state *s, int flush);
-block_state deflate_quick (deflate_state *s, int flush);
+ZLIB_INTERNAL block_state deflate_fast (deflate_state *s, int flush);
+ZLIB_INTERNAL block_state deflate_quick (deflate_state *s, int flush);
#ifdef MEDIUM_STRATEGY
-block_state deflate_medium (deflate_state *s, int flush);
+ZLIB_INTERNAL block_state deflate_medium (deflate_state *s, int flush);
#endif
-block_state deflate_slow (deflate_state *s, int flush);
+ZLIB_INTERNAL block_state deflate_slow (deflate_state *s, int flush);
static block_state deflate_rle (deflate_state *s, int flush);
static block_state deflate_huff (deflate_state *s, int flush);
static void lm_init (deflate_state *s);
* option -- not supported here).
*/
-void fill_window_c(deflate_state *s) {
+void ZLIB_INTERNAL fill_window_c(deflate_state *s) {
unsigned n;
unsigned more; /* Amount of free space at the end of the window. */
unsigned int wsize = s->w_size;
memory checker errors from longest match routines */
-void fill_window_c(deflate_state *s);
+void ZLIB_INTERNAL fill_window_c(deflate_state *s);
/* in trees.c */
void ZLIB_INTERNAL _tr_init(deflate_state *s);
* new strings in the dictionary only for unmatched strings or for short
* matches. It is used only for the fast compression options.
*/
-block_state deflate_fast(deflate_state *s, int flush) {
+ZLIB_INTERNAL block_state deflate_fast(deflate_state *s, int flush) {
IPos hash_head; /* head of the hash chain */
int bflush; /* set if current block must be flushed */
}
}
-block_state deflate_medium(deflate_state *s, int flush) {
+ZLIB_INTERNAL block_state deflate_medium(deflate_state *s, int flush) {
struct match current_match, next_match;
memset(¤t_match, 0, sizeof(struct match));
* evaluation for matches: a match is finally adopted only if there is
* no better match at the next window position.
*/
-block_state deflate_slow(deflate_state *s, int flush) {
+ZLIB_INTERNAL block_state deflate_slow(deflate_state *s, int flush) {
IPos hash_head; /* head of hash chain */
int bflush; /* set if current block must be flushed */
/* insert_string */
-ZLIB_INTERNAL Pos insert_string_stub(deflate_state *const s, const Pos str, unsigned int count);
#ifdef X86_SSE4_2_CRC_HASH
extern Pos insert_string_sse(deflate_state *const s, const Pos str, unsigned int count);
#elif defined(ARM_ACLE_CRC_HASH)
#endif
/* fill_window */
-ZLIB_INTERNAL void fill_window_stub(deflate_state *s);
#ifdef X86_SSE2_FILL_WINDOW
extern void fill_window_sse(deflate_state *s);
#elif defined(__arm__) || defined(__aarch64__) || defined(_M_ARM)
#endif
/* adler32 */
-ZLIB_INTERNAL uint32_t adler32_stub(uint32_t adler, const unsigned char *buf, size_t len);
+extern uint32_t adler32_c(uint32_t adler, const unsigned char *buf, size_t len);
#if (defined(__ARM_NEON__) || defined(__ARM_NEON))
extern uint32_t adler32_neon(uint32_t adler, const unsigned char *buf, size_t len);
#endif
+/* stub definitions */
+ZLIB_INTERNAL Pos insert_string_stub(deflate_state *const s, const Pos str, unsigned int count);
+ZLIB_INTERNAL void fill_window_stub(deflate_state *s);
+ZLIB_INTERNAL uint32_t adler32_stub(uint32_t adler, const unsigned char *buf, size_t len);
+
+/* functable init */
+ZLIB_INTERNAL struct functable_s functable = {fill_window_stub,insert_string_stub,adler32_stub};
-struct functable_s functable = {fill_window_stub,insert_string_stub,adler32_stub};
/* stub functions */
ZLIB_INTERNAL Pos insert_string_stub(deflate_state *const s, const Pos str, unsigned int count) {
#include "deflate.h"
-uint32_t adler32_c(uint32_t adler, const unsigned char *buf, size_t len);
-
struct functable_s {
void (* fill_window) (deflate_state *s);
Pos (* insert_string) (deflate_state *const s, const Pos str, unsigned int count);
uint32_t (* adler32) (uint32_t adler, const unsigned char *buf, size_t len);
};
-extern struct functable_s functable;
+ZLIB_INTERNAL extern struct functable_s functable;
#endif