#endif
/* ========================================================================= */
-uint32_t ZEXPORT adler32(uint32_t adler, const Byte *buf, uInt len)
+uint32_t ZEXPORT adler32(uint32_t adler, const unsigned char *buf, uInt len)
{
uint32_t sum2;
unsigned n;
#include <immintrin.h>
#include "deflate.h"
-extern int read_buf (z_stream *strm, Byte *buf, unsigned size);
+extern int read_buf (z_stream *strm, unsigned char *buf, unsigned size);
ZLIB_INTERNAL void fill_window_sse(deflate_state *s)
{
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
Z_STREAM_ERROR if the level parameter is invalid.
*/
-int ZEXPORT compress2 (Byte *dest, uLong *destLen, const Byte *source,
+int ZEXPORT compress2 (unsigned char *dest, uLong *destLen, const unsigned char *source,
uLong sourceLen, int level)
{
z_stream stream;
int err;
- stream.next_in = (const Byte *)source;
+ stream.next_in = (const unsigned char *)source;
stream.avail_in = (uInt)sourceLen;
stream.next_out = dest;
stream.avail_out = (uInt)*destLen;
/* ===========================================================================
*/
-int ZEXPORT compress (Byte *dest, uLong *destLen, const Byte *source, uLong sourceLen)
+int ZEXPORT compress (unsigned char *dest, uLong *destLen, const unsigned char *source, uLong sourceLen)
{
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
}
#endif
}
-ZLIB_INTERNAL void copy_with_crc(z_stream *strm, Byte *dst, long size)
+ZLIB_INTERNAL void copy_with_crc(z_stream *strm, unsigned char *dst, long size)
{
#ifdef X86_PCLMULQDQ_CRC
if (x86_cpu_has_pclmulqdq) {
local void lm_init (deflate_state *s);
local void putShortMSB (deflate_state *s, uInt b);
ZLIB_INTERNAL void flush_pending (z_stream *strm);
-ZLIB_INTERNAL int read_buf (z_stream *strm, Byte *buf, unsigned size);
+ZLIB_INTERNAL int read_buf (z_stream *strm, unsigned char *buf, unsigned size);
#ifdef DEBUG
local void check_match (deflate_state *s, IPos start, IPos match, int length);
extern void crc_reset(deflate_state *const s);
extern void crc_finalize(deflate_state *const s);
-extern void copy_with_crc(z_stream *strm, Byte *dst, long size);
+extern void copy_with_crc(z_stream *strm, unsigned char *dst, long size);
/* ===========================================================================
* Local data
*/
#define CLEAR_HASH(s) \
s->head[s->hash_size-1] = NIL; \
- memset((Byte *)s->head, 0, (unsigned)(s->hash_size-1)*sizeof(*s->head));
+ memset((unsigned char *)s->head, 0, (unsigned)(s->hash_size-1)*sizeof(*s->head));
/* ========================================================================= */
int ZEXPORT deflateInit_(z_stream *strm, int level, const char *version, int stream_size)
window_padding = 8;
#endif
- s->window = (Byte *) ZALLOC(strm, s->w_size + window_padding, 2*sizeof(Byte));
+ s->window = (unsigned char *) ZALLOC(strm, s->w_size + window_padding, 2*sizeof(unsigned char));
s->prev = (Pos *) ZALLOC(strm, s->w_size, sizeof(Pos));
s->head = (Pos *) ZALLOC(strm, s->hash_size, sizeof(Pos));
s->level = level;
s->strategy = strategy;
- s->method = (Byte)method;
+ s->method = (unsigned char)method;
return deflateReset(strm);
}
/* ========================================================================= */
-int ZEXPORT deflateSetDictionary (z_stream *strm, const Byte *dictionary, uInt dictLength)
+int ZEXPORT deflateSetDictionary (z_stream *strm, const unsigned char *dictionary, uInt dictLength)
{
deflate_state *s;
uInt str, n;
avail = strm->avail_in;
next = strm->next_in;
strm->avail_in = dictLength;
- strm->next_in = (const Byte *)dictionary;
+ strm->next_in = (const unsigned char *)dictionary;
fill_window(s);
while (s->lookahead >= MIN_MATCH) {
str = s->strstart;
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
s = strm->state;
- if ((Byte *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
+ if ((unsigned char *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
return Z_BUF_ERROR;
do {
put = Buf_size - s->bi_valid;
{
deflate_state *s;
uLong complen, wraplen;
- Byte *str;
+ unsigned char *str;
/* conservative upper bound for compressed data */
complen = sourceLen +
*/
local void putShortMSB (deflate_state *s, uInt b)
{
- put_byte(s, (Byte)(b >> 8));
- put_byte(s, (Byte)(b & 0xff));
+ put_byte(s, (unsigned char)(b >> 8));
+ put_byte(s, (unsigned char)(b & 0xff));
}
/* =========================================================================
(s->gzhead->name == Z_NULL ? 0 : 8) +
(s->gzhead->comment == Z_NULL ? 0 : 16)
);
- put_byte(s, (Byte)(s->gzhead->time & 0xff));
- put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
- put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
- put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
+ put_byte(s, (unsigned char)(s->gzhead->time & 0xff));
+ put_byte(s, (unsigned char)((s->gzhead->time >> 8) & 0xff));
+ put_byte(s, (unsigned char)((s->gzhead->time >> 16) & 0xff));
+ put_byte(s, (unsigned char)((s->gzhead->time >> 24) & 0xff));
put_byte(s, s->level == 9 ? 2 :
(s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
4 : 0));
if (s->pending + 2 > s->pending_buf_size)
flush_pending(strm);
if (s->pending + 2 <= s->pending_buf_size) {
- put_byte(s, (Byte)(strm->adler & 0xff));
- put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
+ put_byte(s, (unsigned char)(strm->adler & 0xff));
+ put_byte(s, (unsigned char)((strm->adler >> 8) & 0xff));
strm->adler = crc32(0L, Z_NULL, 0);
s->status = BUSY_STATE;
}
#ifdef GZIP
if (s->wrap == 2) {
crc_finalize(s);
- put_byte(s, (Byte)(strm->adler & 0xff));
- put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
- put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
- put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
- put_byte(s, (Byte)(strm->total_in & 0xff));
- put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
- put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
- put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
+ put_byte(s, (unsigned char)(strm->adler & 0xff));
+ put_byte(s, (unsigned char)((strm->adler >> 8) & 0xff));
+ put_byte(s, (unsigned char)((strm->adler >> 16) & 0xff));
+ put_byte(s, (unsigned char)((strm->adler >> 24) & 0xff));
+ put_byte(s, (unsigned char)(strm->total_in & 0xff));
+ put_byte(s, (unsigned char)((strm->total_in >> 8) & 0xff));
+ put_byte(s, (unsigned char)((strm->total_in >> 16) & 0xff));
+ put_byte(s, (unsigned char)((strm->total_in >> 24) & 0xff));
}
else
#endif
memcpy((void *)ds, (void *)ss, sizeof(deflate_state));
ds->strm = dest;
- ds->window = (Byte *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
+ ds->window = (unsigned char *) ZALLOC(dest, ds->w_size, 2*sizeof(unsigned char));
ds->prev = (Pos *) ZALLOC(dest, ds->w_size, sizeof(Pos));
ds->head = (Pos *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
overlay = (ush *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
return Z_MEM_ERROR;
}
- memcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
+ memcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(unsigned char));
memcpy((void *)ds->prev, (void *)ss->prev, ds->w_size * sizeof(Pos));
memcpy((void *)ds->head, (void *)ss->head, ds->hash_size * sizeof(Pos));
memcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
* allocating a large strm->next_in buffer and copying from it.
* (See also flush_pending()).
*/
-ZLIB_INTERNAL int read_buf(z_stream *strm, Byte *buf, unsigned size)
+ZLIB_INTERNAL int read_buf(z_stream *strm, unsigned char *buf, unsigned size)
{
unsigned len = strm->avail_in;
{
int bflush; /* set if current block must be flushed */
uInt prev; /* byte at distance one to match */
- Byte *scan, *strend; /* scan goes up to strend for length of run */
+ unsigned char *scan, *strend; /* scan goes up to strend for length of run */
for (;;) {
/* Make sure that we always have enough lookahead, except
typedef struct internal_state {
z_stream *strm; /* pointer back to this zlib stream */
int status; /* as the name implies */
- Byte *pending_buf; /* output still pending */
+ unsigned char *pending_buf; /* output still pending */
ulg pending_buf_size; /* size of pending_buf */
- Byte *pending_out; /* next pending byte to output to the stream */
+ unsigned char *pending_out; /* next pending byte to output to the stream */
uInt pending; /* nb of bytes in the pending buffer */
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
gz_headerp gzhead; /* gzip header information to write */
uInt gzindex; /* where in extra, name, or comment */
- Byte method; /* can only be DEFLATED */
+ unsigned char method; /* can only be DEFLATED */
int last_flush; /* value of flush param for previous deflate call */
#ifdef X86_PCLMULQDQ_CRC
uInt w_bits; /* log2(w_size) (8..16) */
uInt w_mask; /* w_size - 1 */
- Byte *window;
+ unsigned char *window;
/* Sliding window. Input bytes are read into the second half of the window,
* and move to the first half later to keep a dictionary of at least wSize
* bytes. With this organization, matches are limited to a distance of
/* directly compress user buffer to file */
strm->avail_in = len;
- strm->next_in = (const Byte *)buf;
+ strm->next_in = (const unsigned char *)buf;
state->x.pos += len;
if (gz_comp(state, Z_NO_FLUSH) == -1)
return 0;
output will fall in the output data, making match copies simpler and faster.
The advantage may be dependent on the size of the processor's data caches.
*/
-local int updatewindow(z_stream *strm, const Byte *end, unsigned copy)
+local int updatewindow(z_stream *strm, const unsigned char *end, unsigned copy)
{
struct inflate_state *state;
unsigned dist;
return Z_OK;
}
-int ZEXPORT inflateGetDictionary(z_stream *strm, Byte *dictionary, uInt *dictLength)
+int ZEXPORT inflateGetDictionary(z_stream *strm, unsigned char *dictionary, uInt *dictLength)
{
struct inflate_state *state;
return Z_OK;
}
-int ZEXPORT inflateSetDictionary(z_stream *strm, const Byte *dictionary, uInt dictLength)
+int ZEXPORT inflateSetDictionary(z_stream *strm, const unsigned char *dictionary, uInt dictLength)
{
struct inflate_state *state;
unsigned long dictid;
ZLIB_INTERNAL unsigned longest_match(deflate_state *const s, IPos cur_match)
{
unsigned chain_length = s->max_chain_length;/* max hash chain length */
- register Byte *scan = s->window + s->strstart; /* current string */
- register Byte *match; /* matched string */
+ register unsigned char *scan = s->window + s->strstart; /* current string */
+ register unsigned char *match; /* matched string */
register unsigned int len; /* length of current match */
unsigned int best_len = s->prev_length; /* best match length so far */
unsigned int nice_match = s->nice_match; /* stop if match long enough */
Pos *prev = s->prev;
uInt wmask = s->w_mask;
- register Byte *strend = s->window + s->strstart + MAX_MATCH;
+ register unsigned char *strend = s->window + s->strstart + MAX_MATCH;
register unsigned short scan_start = *(unsigned short*)scan;
register unsigned short scan_end = *(unsigned short*)(scan+best_len-1);
* However the length of the match is limited to the lookahead, so
* the output of deflate is not affected by the uninitialized values.
*/
- Byte *win = s->window;
+ unsigned char *win = s->window;
int cont = 1;
do {
match = win + cur_match;
const char dictionary[] = "hello";
uLong dictId; /* Adler32 value of the dictionary */
-void test_deflate (Byte *compr, uLong comprLen);
-void test_inflate (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen);
-void test_large_deflate (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen);
-void test_large_inflate (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen);
-void test_flush (Byte *compr, uLong *comprLen);
-void test_sync (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen);
-void test_dict_deflate (Byte *compr, uLong comprLen);
-void test_dict_inflate (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen);
+void test_deflate (unsigned char *compr, uLong comprLen);
+void test_inflate (unsigned char *compr, uLong comprLen, unsigned char *uncompr, uLong uncomprLen);
+void test_large_deflate (unsigned char *compr, uLong comprLen, unsigned char *uncompr, uLong uncomprLen);
+void test_large_inflate (unsigned char *compr, uLong comprLen, unsigned char *uncompr, uLong uncomprLen);
+void test_flush (unsigned char *compr, uLong *comprLen);
+void test_sync (unsigned char *compr, uLong comprLen, unsigned char *uncompr, uLong uncomprLen);
+void test_dict_deflate (unsigned char *compr, uLong comprLen);
+void test_dict_inflate (unsigned char *compr, uLong comprLen, unsigned char *uncompr, uLong uncomprLen);
int main (int argc, char *argv[]);
static alloc_func zalloc = (alloc_func)0;
static free_func zfree = (free_func)0;
-void test_compress (Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen);
+void test_compress (unsigned char *compr, uLong comprLen,
+ unsigned char *uncompr, uLong uncomprLen);
/* ===========================================================================
* Test compress() and uncompress()
*/
-void test_compress(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
+void test_compress(unsigned char *compr, uLong comprLen, unsigned char *uncompr, uLong uncomprLen)
{
int err;
uLong len = (uLong)strlen(hello)+1;
- err = compress(compr, &comprLen, (const Byte*)hello, len);
+ err = compress(compr, &comprLen, (const unsigned char*)hello, len);
CHECK_ERR(err, "compress");
strcpy((char*)uncompr, "garbage");
/* ===========================================================================
* Test read/write of .gz files
*/
-void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen)
+void test_gzio(const char *fname, unsigned char *uncompr, uLong uncomprLen)
{
#ifdef NO_GZCOMPRESS
fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n");
/* ===========================================================================
* Test deflate() with small buffers
*/
-void test_deflate(Byte *compr, uLong comprLen)
+void test_deflate(unsigned char *compr, uLong comprLen)
{
z_stream c_stream; /* compression stream */
int err;
/* ===========================================================================
* Test inflate() with small buffers
*/
-void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
+void test_inflate(unsigned char *compr, uLong comprLen, unsigned char *uncompr, uLong uncomprLen)
{
int err;
z_stream d_stream; /* decompression stream */
/* ===========================================================================
* Test deflate() with large buffers and dynamic change of compression level
*/
-void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
+void test_large_deflate(unsigned char *compr, uLong comprLen, unsigned char *uncompr, uLong uncomprLen)
{
z_stream c_stream; /* compression stream */
int err;
/* ===========================================================================
* Test inflate() with large buffers
*/
-void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
+void test_large_inflate(unsigned char *compr, uLong comprLen, unsigned char *uncompr, uLong uncomprLen)
{
int err;
z_stream d_stream; /* decompression stream */
/* ===========================================================================
* Test deflate() with full flush
*/
-void test_flush(Byte *compr, uLong *comprLen)
+void test_flush(unsigned char *compr, uLong *comprLen)
{
z_stream c_stream; /* compression stream */
int err;
/* ===========================================================================
* Test inflateSync()
*/
-void test_sync(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
+void test_sync(unsigned char *compr, uLong comprLen, unsigned char *uncompr, uLong uncomprLen)
{
int err;
z_stream d_stream; /* decompression stream */
/* ===========================================================================
* Test deflate() with preset dictionary
*/
-void test_dict_deflate(Byte *compr, uLong comprLen)
+void test_dict_deflate(unsigned char *compr, uLong comprLen)
{
z_stream c_stream; /* compression stream */
int err;
CHECK_ERR(err, "deflateInit");
err = deflateSetDictionary(&c_stream,
- (const Byte*)dictionary, (int)sizeof(dictionary));
+ (const unsigned char*)dictionary, (int)sizeof(dictionary));
CHECK_ERR(err, "deflateSetDictionary");
dictId = c_stream.adler;
/* ===========================================================================
* Test inflate() with a preset dictionary
*/
-void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
+void test_dict_inflate(unsigned char *compr, uLong comprLen, unsigned char *uncompr, uLong uncomprLen)
{
int err;
z_stream d_stream; /* decompression stream */
fprintf(stderr, "unexpected dictionary");
exit(1);
}
- err = inflateSetDictionary(&d_stream, (const Byte*)dictionary,
+ err = inflateSetDictionary(&d_stream, (const unsigned char*)dictionary,
(int)sizeof(dictionary));
}
CHECK_ERR(err, "inflate with dict");
int main(int argc, char *argv[])
{
- Byte *compr, *uncompr;
+ unsigned char *compr, *uncompr;
uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */
uLong uncomprLen = comprLen;
static const char* myVersion = ZLIB_VERSION;
printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n",
ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags());
- compr = (Byte*)calloc((uInt)comprLen, 1);
- uncompr = (Byte*)calloc((uInt)uncomprLen, 1);
+ compr = (unsigned char*)calloc((uInt)comprLen, 1);
+ uncompr = (unsigned char*)calloc((uInt)uncomprLen, 1);
/* compr and uncompr are cleared to avoid reading uninitialized
* data and to ensure that uncompr compresses well.
*/
s->bi_buf = 0;
s->bi_valid = 0;
} else if (s->bi_valid >= 8) {
- put_byte(s, (Byte)s->bi_buf);
+ put_byte(s, (unsigned char)s->bi_buf);
s->bi_buf >>= 8;
s->bi_valid -= 8;
}
if (s->bi_valid > 8) {
put_short(s, s->bi_buf);
} else if (s->bi_valid > 0) {
- put_byte(s, (Byte)s->bi_buf);
+ put_byte(s, (unsigned char)s->bi_buf);
}
s->bi_buf = 0;
s->bi_valid = 0;
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer, or Z_DATA_ERROR if the input data was corrupted.
*/
-int ZEXPORT uncompress (Byte *dest, uLong *destLen, const Byte *source, uLong sourceLen)
+int ZEXPORT uncompress (Byte *dest, uLong *destLen, const unsigned char *source, uLong sourceLen)
{
z_stream stream;
int err;
- stream.next_in = (const Byte *)source;
+ stream.next_in = (const unsigned char *)source;
stream.avail_in = (uInt)sourceLen;
stream.next_out = dest;
stream.avail_out = (uInt)*destLen;
# define ZEXPORTVA
#endif
-#if !defined(__MACTYPES__)
-typedef unsigned char Byte; /* 8 bits */
-#endif
+/* Fallback for something that includes us. */
+#define Byte unsigned char
+#define Bytef unsigned char
+
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
-typedef Byte Bytef;
typedef char charf;
typedef int intf;
typedef uInt uIntf;
struct internal_state;
typedef struct z_stream_s {
- const Byte *next_in; /* next input byte */
+ const unsigned char *next_in; /* next input byte */
uInt avail_in; /* number of bytes available at next_in */
uLong total_in; /* total number of input bytes read so far */
- Byte *next_out; /* next output byte should be put there */
+ unsigned char *next_out; /* next output byte should be put there */
uInt avail_out; /* remaining free space at next_out */
uLong total_out; /* total number of bytes output so far */
uLong time; /* modification time */
int xflags; /* extra flags (not used when writing a gzip file) */
int os; /* operating system */
- Byte *extra; /* pointer to extra field or Z_NULL if none */
+ unsigned char *extra; /* pointer to extra field or Z_NULL if none */
uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
uInt extra_max; /* space at extra (only when reading header) */
- Byte *name; /* pointer to zero-terminated file name or Z_NULL */
+ unsigned char *name; /* pointer to zero-terminated file name or Z_NULL */
uInt name_max; /* space at name (only when reading header) */
- Byte *comment; /* pointer to zero-terminated comment or Z_NULL */
+ unsigned char *comment; /* pointer to zero-terminated comment or Z_NULL */
uInt comm_max; /* space at comment (only when reading header) */
int hcrc; /* true if there was or will be a header crc */
int done; /* true when done reading gzip header (not used
*/
ZEXTERN int ZEXPORT deflateSetDictionary (z_stream *strm,
- const Byte *dictionary,
+ const unsigned char *dictionary,
uInt dictLength);
/*
Initializes the compression dictionary from the given byte sequence
*/
ZEXTERN int ZEXPORT inflateSetDictionary (z_stream *strm,
- const Byte *dictionary,
+ const unsigned char *dictionary,
uInt dictLength);
/*
Initializes the decompression dictionary from the given uncompressed byte
*/
ZEXTERN int ZEXPORT inflateGetDictionary (z_stream *strm,
- Byte *dictionary,
+ unsigned char *dictionary,
uInt *dictLength);
/*
Returns the sliding dictionary being maintained by inflate. dictLength is
you need special options.
*/
-ZEXTERN int ZEXPORT compress (Byte *dest, uLong *destLen,
- const Byte *source, uLong sourceLen);
+ZEXTERN int ZEXPORT compress (unsigned char *dest, uLong *destLen,
+ const unsigned char *source, uLong sourceLen);
/*
Compresses the source buffer into the destination buffer. sourceLen is
the byte length of the source buffer. Upon entry, destLen is the total size
buffer.
*/
-ZEXTERN int ZEXPORT compress2 (Byte *dest, uLong *destLen,
- const Byte *source, uLong sourceLen,
+ZEXTERN int ZEXPORT compress2 (unsigned char *dest, uLong *destLen,
+ const unsigned char *source, uLong sourceLen,
int level);
/*
Compresses the source buffer into the destination buffer. The level
compress() or compress2() call to allocate the destination buffer.
*/
-ZEXTERN int ZEXPORT uncompress (Byte *dest, uLong *destLen,
- const Byte *source, uLong sourceLen);
+ZEXTERN int ZEXPORT uncompress (unsigned char *dest, uLong *destLen,
+ const unsigned char *source, uLong sourceLen);
/*
Decompresses the source buffer into the destination buffer. sourceLen is
the byte length of the source buffer. Upon entry, destLen is the total size
library.
*/
-ZEXTERN uint32_t ZEXPORT adler32 (uint32_t adler, const Byte *buf, uInt len);
+ZEXTERN uint32_t ZEXPORT adler32 (uint32_t adler, const unsigned char *buf, uInt len);
/*
Update a running Adler-32 checksum with the bytes buf[0..len-1] and
return the updated checksum. If buf is Z_NULL, this function returns the
negative, the result has no meaning or utility.
*/
-ZEXTERN uint32_t ZEXPORT crc32 (uint32_t crc, const Byte *buf, uInt len);
+ZEXTERN uint32_t ZEXPORT crc32 (uint32_t crc, const unsigned char *buf, uInt len);
/*
Update a running CRC-32 with the bytes buf[0..len-1] and return the
updated CRC-32. If buf is Z_NULL, this function returns the required