16#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
17#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
18#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
19#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
20#define DO16(buf) DO8(buf,0); DO8(buf,8);
29 unsigned long tmp = a >> 16; \
31 a += (tmp << 4) - tmp; \
36 if (a >= BASE) a -= BASE; \
45 z_off64_t tmp = a >> 32; \
47 a += (tmp << 8) - (tmp << 5) + tmp; \
50 a += (tmp << 4) - tmp; \
53 a += (tmp << 4) - tmp; \
54 if (a >= BASE) a -= BASE; \
57# define MOD(a) a %= BASE
58# define MOD28(a) a %= BASE
59# define MOD63(a) a %= BASE
72 sum2 = (adler >> 16) & 0xffff;
83 return adler | (sum2 << 16);
99 return adler | (sum2 << 16);
103 while (len >=
NMAX) {
130 return adler | (sum2 << 16);
158 rem = (unsigned)len2;
159 sum1 = adler1 & 0xffff;
162 sum1 += (adler2 & 0xffff) +
BASE - 1;
163 sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) +
BASE - rem;
166 if (sum2 >= ((
unsigned long)
BASE << 1)) sum2 -= ((
unsigned long)
BASE << 1);
168 return sum1 | (sum2 << 16);
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 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)
voidpf alloc_func OF((voidpf opaque, uInt items, uInt size))