zlib 1.0.1

This commit is contained in:
Mark Adler
2011-09-09 23:14:39 -07:00
parent 8a2acbffc8
commit 423eb40306
37 changed files with 1812 additions and 679 deletions

View File

@@ -1,5 +1,5 @@
/* inflate_util.c -- data and routines common to blocks and codes
* Copyright (C) 1995 Mark Adler
* Copyright (C) 1995-1996 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -12,7 +12,7 @@
struct inflate_codes_state {int dummy;}; /* for buggy compilers */
/* And'ing with mask[n] masks the lower n bits */
uInt inflate_mask[] = {
uInt inflate_mask[17] = {
0x0000,
0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
@@ -43,7 +43,7 @@ int r;
/* update check information */
if (s->checkfn != Z_NULL)
s->check = (*s->checkfn)(s->check, q, n);
z->adler = s->check = (*s->checkfn)(s->check, q, n);
/* copy as far as end of window */
zmemcpy(p, q, n);
@@ -69,7 +69,7 @@ int r;
/* update check information */
if (s->checkfn != Z_NULL)
s->check = (*s->checkfn)(s->check, q, n);
z->adler = s->check = (*s->checkfn)(s->check, q, n);
/* copy */
zmemcpy(p, q, n);