Lines Matching full:adler
1 /* adler32.c -- compute the Adler-32 checksum of a data stream
2 * Copyright (C) 1995-2007 Mark Adler
18 #define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
60 uLong ZEXPORT adler32(adler, buf, len)
61 uLong adler;
68 /* split Adler-32 into component sums */
69 sum2 = (adler >> 16) & 0xffff;
70 adler &= 0xffff;
74 adler += buf[0];
75 if (adler >= BASE)
76 adler -= BASE;
77 sum2 += adler;
80 return adler | (sum2 << 16);
83 /* initial Adler-32 value (deferred check for len == 1 speed) */
90 adler += *buf++;
91 sum2 += adler;
93 if (adler >= BASE)
94 adler -= BASE;
96 return adler | (sum2 << 16);
107 MOD(adler);
119 adler += *buf++;
120 sum2 += adler;
122 MOD(adler);
127 return adler | (sum2 << 16);