Skip to content

Commit

Permalink
zlib 1.2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Sep 10, 2011
1 parent 79fbcdc commit 9811b53
Show file tree
Hide file tree
Showing 36 changed files with 1,338 additions and 433 deletions.
20 changes: 20 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@

ChangeLog file for zlib

Changes in 1.2.2.1 (31 October 2004)
- Allow inflateSetDictionary() call for raw inflate
- Fix inflate header crc check bug for file names and comments
- Add deflateSetHeader() and gz_header structure for custom gzip headers
- Add inflateGetheader() to retrieve gzip headers
- Add crc32_combine() and adler32_combine() functions
- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list
- Use zstreamp consistently in zlib.h (inflate_back functions)
- Remove GUNZIP condition from definition of inflate_mode in inflate.h
and in contrib/inflate86/inffast.S [Truta, Anderson]
- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson]
- Update projects/README.projects and projects/visualc6 [Truta]
- Update win32/DLL_FAQ.txt [Truta]
- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta]
- Deprecate Z_ASCII; use Z_TEXT instead [Truta]
- Use a new algorithm for setting strm->data_type in trees.c [Truta]
- Do not define an exit() prototype in zutil.c unless DEBUG defined
- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta]
- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate()

Changes in 1.2.2 (3 October 2004)
- Update zlib.h comments on gzip in-memory processing
- Set adler to 1 in inflateReset() to support Java test suite [Walles]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CPP=$(CC) -E

LIBS=libz.a
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.2.2
SHAREDLIBV=libz.so.1.2.2.1
SHAREDLIBM=libz.so.1

AR=ar rc
Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CPP=$(CC) -E

LIBS=libz.a
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.2.2
SHAREDLIBV=libz.so.1.2.2.1
SHAREDLIBM=libz.so.1

AR=ar rc
Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY

zlib 1.2.2 is a general purpose data compression library. All the code is
zlib 1.2.2.1 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
Expand Down Expand Up @@ -34,7 +34,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
issue of Dr. Dobb's Journal; a copy of the article is available in
http://dogma.net/markn/articles/zlibtool/zlibtool.htm

The changes made in version 1.2.2 are documented in the file ChangeLog.
The changes made in version 1.2.2.1 are documented in the file ChangeLog.

Unsupported third party contributions are provided in directory "contrib".

Expand Down
24 changes: 23 additions & 1 deletion adler32.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* adler32.c -- compute the Adler-32 checksum of a data stream
* Copyright (C) 1995-2003 Mark Adler
* Copyright (C) 1995-2004 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down Expand Up @@ -72,3 +72,25 @@ uLong ZEXPORT adler32(adler, buf, len)
}
return (s2 << 16) | s1;
}

/* ========================================================================= */
uLong ZEXPORT adler32_combine(adler1, adler2, len2)
uLong adler1;
uLong adler2;
uLong len2;
{
unsigned long s1;
unsigned long s2;

len2 %= BASE;
s1 = adler1 & 0xffff;
s2 = len2 * s1;
MOD(s2);
s1 += (adler2 & 0xffff) + BASE - 1;
s2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - len2;
if (s1 > BASE) s1 -= BASE;
if (s1 > BASE) s1 -= BASE;
if (s2 > (BASE << 1)) s2 -= (BASE << 1);
if (s2 > BASE) s2 -= BASE;
return (s2 << 16) | s1;
}
6 changes: 3 additions & 3 deletions as400/zlib.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* ZLIB.INC - Interface to the general purpose compression library
*
* ILE RPG400 version by Patrick Monnerat, DATASPHERE.
* Version 1.2.2
* Version 1.2.2.1
*
*
* WARNING:
Expand All @@ -20,8 +20,8 @@
* Constants
**************************************************************************
*
D ZLIB_VERSION C '1.2.2' Header's version
D ZLIB_VERNUM C X'1220'
D ZLIB_VERSION C '1.2.2.1' Header's version
D ZLIB_VERNUM C X'1221'
*
D Z_NO_FLUSH C 0
D Z_SYNC_FLUSH C 2
Expand Down
2 changes: 1 addition & 1 deletion compress.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* compress.c -- compress a memory buffer
* Copyright (C) 1995-2002 Jean-loup Gailly.
* Copyright (C) 1995-2003 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down
4 changes: 2 additions & 2 deletions contrib/infback9/inftree9.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define MAXBITS 15

const char inflate9_copyright[] =
" inflate9 1.2.2 Copyright 1995-2004 Mark Adler ";
" inflate9 1.2.2.1 Copyright 1995-2004 Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
Expand Down Expand Up @@ -64,7 +64,7 @@ unsigned short FAR *work;
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
133, 133, 133, 133, 144, 199, 198};
133, 133, 133, 133, 144, 77, 207};
static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
Expand Down
Loading

0 comments on commit 9811b53

Please sign in to comment.