zlib 1.2.1

This commit is contained in:
Mark Adler
2011-09-09 23:23:27 -07:00
parent a2506218cd
commit 7a33a861d1
23 changed files with 72 additions and 65 deletions

View File

@@ -146,17 +146,6 @@ private package ZLib.Thin is
strategy : Int)
return Int; -- zlib.h:506
function deflateBound
(strm : Z_Streamp;
sourceLen : ULong)
return Int; -- zlib.h:595
function deflatePrime
(strm : Z_Streamp;
bits : Int;
value : Int)
return Int; -- zlib.h:604
function inflateSetDictionary
(strm : Z_Streamp;
dictionary : Byte_Access;
@@ -399,6 +388,12 @@ private package ZLib.Thin is
function zlibCompileFlags return ULong;
function deflatePrime
(strm : Z_Streamp;
bits : Int;
value : Int)
return Int;
private
type Z_Stream is record -- zlib.h:68
@@ -432,8 +427,6 @@ private
pragma Import (C, deflateCopy, "deflateCopy");
pragma Import (C, deflateReset, "deflateReset");
pragma Import (C, deflateParams, "deflateParams");
pragma Import (C, deflateBound, "deflateBound");
pragma Import (C, deflatePrime, "deflatePrime");
pragma Import (C, inflateSetDictionary, "inflateSetDictionary");
pragma Import (C, inflateSync, "inflateSync");
pragma Import (C, inflateReset, "inflateReset");
@@ -467,13 +460,14 @@ private
pragma Import (C, inflateSyncPoint, "inflateSyncPoint");
pragma Import (C, get_crc_table, "get_crc_table");
-- since zlib 1.2.0:
-- added in zlib 1.2.1:
pragma Import (C, inflateCopy, "inflateCopy");
pragma Import (C, compressBound, "compressBound");
pragma Import (C, deflateBound, "deflateBound");
pragma Import (C, gzungetc, "gzungetc");
pragma Import (C, zlibCompileFlags, "zlibCompileFlags");
pragma Import (C, deflatePrime, "deflatePrime");
pragma Import (C, inflateBackInit, "inflateBackInit_");

View File

@@ -14,7 +14,7 @@ we recommend the users to update their ZLib unit.
Summary of modifications
========================
- Improved makefile, adapted to zlib version 1.2.0.
- Improved makefile, adapted to zlib version 1.2.1.
- Some field types from TZStreamRec are changed from Integer to
Longint, for consistency with the zlib.h header, and for 64-bit

View File

@@ -167,7 +167,7 @@ local void rotate(unsigned char *list, unsigned len, unsigned rot)
/* structure for gzip file read operations */
typedef struct {
int fd; /* file descriptor */
int size; /* 1 << size is bytes in buf */
int size; /* 1 << size is bytes in buf */
unsigned left; /* bytes available at next */
unsigned char *buf; /* buffer */
unsigned char *next; /* next byte in buffer */

View File

@@ -9,7 +9,7 @@
#define MAXBITS 15
const char inflate9_copyright[] =
" inflate9 1.2.0.8 Copyright 1995-2003 Mark Adler ";
" inflate9 1.2.1 Copyright 1995-2003 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
@@ -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, 76, 203};
133, 133, 133, 133, 144, 76, 66};
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,

View File

@@ -166,6 +166,7 @@ function deflateEnd; external;
function deflateInit_; external;
function deflateInit2_; external;
function deflateParams; external;
function deflatePrime; external;
function deflateReset; external;
function deflateSetDictionary; external;
function inflate; external;