uLong
uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {
local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {
uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) {
uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {
uLong sourceLen, int level) {
*destLen = (uLong)got;
uLong sourceLen) {
uLong ZEXPORT compressBound(uLong sourceLen) {
return (uLong)bound != bound ? (uLong)-1 : (uLong)bound;
local uLong multmodp(uLong a, uLong b) {
uLong m, p;
m = (uLong)1 << 31;
local uLong x2nmodp(z_off64_t n, unsigned k) {
uLong p;
p = (uLong)1 << 31; /* x^0 == 1 */
uLong ZEXPORT crc32_z(uLong crc, const unsigned char FAR *buf, z_size_t len) {
uLong val;
uLong ZEXPORT crc32_z(uLong crc, const unsigned char FAR *buf, z_size_t len) {
uLong ZEXPORT crc32(uLong crc, const unsigned char FAR *buf, uInt len) {
uLong ZEXPORT crc32_combine_gen64(z_off64_t len2) {
uLong ZEXPORT crc32_combine_gen(z_off_t len2) {
uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) {
uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) {
uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2) {
uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen) {
return (uLong)bound != bound ? (uLong)-1 : (uLong)bound;
uLong *sourceLen) {
*sourceLen = (uLong)used;
*destLen = (uLong)got;
uLong sourceLen) {
uLong used = sourceLen;
typedef uLong FAR uLongf;
uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */
uLong reserved; /* reserved for future use */
uLong time; /* modification time */
ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
const Bytef *source, uLong sourceLen);
const Bytef *source, uLong sourceLen,
ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen);
const Bytef *source, uLong sourceLen);
const Bytef *source, uLong *sourceLen);
ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len);
ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf,
ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len);
ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf,
ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen);
uLong total_in; /* total number of input bytes read so far */
uLong total_out; /* total number of bytes output so far */
uLong ZEXPORT zlibCompileFlags(void) {
uLong flags;
switch ((int)(sizeof(uLong))) {
ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
static void test_deflate(Byte *compr, uLong comprLen) {
uLong len = (uLong)strlen(hello)+1;
static void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
uLong uncomprLen) {
static void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr,
uLong uncomprLen) {
static void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
uLong uncomprLen) {
static void test_flush(Byte *compr, uLong *comprLen) {
static uLong dictId; /* Adler32 value of the dictionary */
static void test_sync(Byte *compr, uLong comprLen, Byte *uncompr,
uLong uncomprLen) {
static void test_dict_deflate(Byte *compr, uLong comprLen) {
static void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
uLong uncomprLen) {
uLong uncomprLen = 20000;
uLong comprLen = 3 * uncomprLen;
static void test_compress(Byte *compr, uLong comprLen, Byte *uncompr,
uLong uncomprLen) {
uLong len = (uLong)strlen(hello)+1;
static void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) {
uLong crc1 = crc32(0L, Z_NULL, 0);
uLong crc2 = crc32(0L, Z_NULL, 0);
uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {
local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {
uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) {
uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {
uLong sourceLen, int level) {
*destLen = (uLong)got;
uLong sourceLen) {
uLong ZEXPORT compressBound(uLong sourceLen) {
return (uLong)bound != bound ? (uLong)-1 : (uLong)bound;
local uLong multmodp(uLong a, uLong b) {
uLong m, p;
m = (uLong)1 << 31;
local uLong x2nmodp(z_off64_t n, unsigned k) {
uLong p;
p = (uLong)1 << 31; /* x^0 == 1 */
uLong ZEXPORT crc32_z(uLong crc, const unsigned char FAR *buf, z_size_t len) {
uLong val;
uLong ZEXPORT crc32_z(uLong crc, const unsigned char FAR *buf, z_size_t len) {
uLong ZEXPORT crc32(uLong crc, const unsigned char FAR *buf, uInt len) {
uLong ZEXPORT crc32_combine_gen64(z_off64_t len2) {
uLong ZEXPORT crc32_combine_gen(z_off_t len2) {
uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) {
uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) {
uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2) {
uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen) {
return (uLong)bound != bound ? (uLong)-1 : (uLong)bound;
typedef uLong FAR uLongf;
uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */
uLong reserved; /* reserved for future use */
uLong time; /* modification time */
ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
const Bytef *source, uLong sourceLen);
const Bytef *source, uLong sourceLen,
ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen);
const Bytef *source, uLong sourceLen);
const Bytef *source, uLong *sourceLen);
ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len);
ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf,
ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len);
ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf,
ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen);
uLong total_in; /* total number of input bytes read so far */
uLong total_out; /* total number of bytes output so far */
uLong ZEXPORT zlibCompileFlags(void) {
uLong flags;
switch ((int)(sizeof(uLong))) {
ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
uLong old_total_in;
s->z_total_in += (uLong)(s->z_stream.total_in -
s->z_total_in += (uLong)(s->z_stream.total_in - old_total_in);
s->z_total_in += (uLong)(s->z_stream.total_in - old_total_in);
uLong copy_len;
uLong prev_total_in = s->z_stream.total_in;
uLong prev_total_out = s->z_stream.total_out;
uLong srclen;