extern uint8_t* chunkmemset_safe_power8(uint8_t *out, unsigned dist, unsigned len, unsigned left);
#endif
+#ifdef ZLIB_COMPAT
+typedef struct z_stream_s z_stream;
+#else
+typedef struct zng_stream_s zng_stream;
+#endif
+
/* inflate fast loop */
-extern void inflate_fast_c(void *strm, uint32_t start);
+extern void inflate_fast_c(PREFIX3(stream) *strm, uint32_t start);
#ifdef X86_SSE2_CHUNKSET
-extern void inflate_fast_sse2(void *strm, uint32_t start);
+extern void inflate_fast_sse2(PREFIX3(stream) *strm, uint32_t start);
#endif
#ifdef X86_SSE41
-extern void inflate_fast_sse41(void *strm, uint32_t start);
+extern void inflate_fast_sse41(PREFIX3(stream) *strm, uint32_t start);
#endif
#ifdef X86_AVX_CHUNKSET
-extern void inflate_fast_avx(void *strm, uint32_t start);
+extern void inflate_fast_avx(PREFIX3(stream) *strm, uint32_t start);
#endif
#ifdef ARM_NEON_CHUNKSET
-extern void inflate_fast_neon(void *strm, uint32_t start);
+extern void inflate_fast_neon(PREFIX3(stream) *strm, uint32_t start);
#endif
#ifdef POWER8_VSX_CHUNKSET
-extern void inflate_fast_power8(void *strm, uint32_t start);
+extern void inflate_fast_power8(PREFIX3(stream) *strm, uint32_t start);
#endif
/* CRC32 */
return functable.chunkmemset_safe(out, dist, len, left);
}
-static void inflate_fast_stub(void *strm, uint32_t start) {
+static void inflate_fast_stub(PREFIX3(stream) *strm, uint32_t start) {
init_functable();
functable.inflate_fast(strm, start);
}
#include "crc32_fold.h"
#include "adler32_fold.h"
+#ifdef ZLIB_COMPAT
+typedef struct z_stream_s z_stream;
+#else
+typedef struct zng_stream_s zng_stream;
+#endif
+
struct functable_s {
uint32_t (* adler32) (uint32_t adler, const uint8_t *buf, size_t len);
uint32_t (* adler32_fold_copy) (uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
uint32_t (* compare256) (const uint8_t *src0, const uint8_t *src1);
uint32_t (* chunksize) (void);
uint8_t* (* chunkmemset_safe) (uint8_t *out, unsigned dist, unsigned len, unsigned left);
- void (* inflate_fast) (void *strm, uint32_t start);
+ void (* inflate_fast) (PREFIX3(stream) *strm, uint32_t start);
void (* insert_string) (deflate_state *const s, uint32_t str, uint32_t count);
uint32_t (* longest_match) (deflate_state *const s, Pos cur_match);
uint32_t (* longest_match_slow) (deflate_state *const s, Pos cur_match);