zadler32.c revision ada1678a4262b208a7b87391f520a7767d25287c
/*
* @(#)zadler32.c 1.12 02/06/11
*/
/*
* All rights reserved.
*/
/* adler32.c -- compute the Adler-32 checksum of a data stream
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include "zlib.h"
#define NMAX 5552
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
/* ========================================================================= */
{
int k;
while (len > 0) {
len -= k;
while (k >= 16) {
buf += 16;
k -= 16;
}
if (k != 0) do {
} while (--k);
}
}