15#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
16#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
17#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
18#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
19#define DO16(buf) DO8(buf,0); DO8(buf,8);
28 unsigned long tmp = a >> 16; \
30 a += (tmp << 4) - tmp; \
35 if (a >= BASE) a -= BASE; \
44 z_off64_t tmp = a >> 32; \
46 a += (tmp << 8) - (tmp << 5) + tmp; \
49 a += (tmp << 4) - tmp; \
52 a += (tmp << 4) - tmp; \
53 if (a >= BASE) a -= BASE; \
56# define MOD(a) a %= BASE
57# define MOD28(a) a %= BASE
58# define MOD63(a) a %= BASE
71 sum2 = (adler >> 16) & 0xffff;
82 return adler | (sum2 << 16);
98 return adler | (sum2 << 16);
102 while (len >=
NMAX) {
129 return adler | (sum2 << 16);
157 rem = (unsigned)len2;
158 sum1 = adler1 & 0xffff;
161 sum1 += (adler2 & 0xffff) +
BASE - 1;
162 sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) +
BASE - rem;
165 if (sum2 >= ((
unsigned long)
BASE << 1)) sum2 -= ((
unsigned long)
BASE << 1);
167 return sum1 | (sum2 << 16);
uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2)
uLong adler32_combine_ OF((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)
uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2)
uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2)