zlib.inc (muscle7.61) | : | zlib.inc (muscle7.62) | ||
---|---|---|---|---|
* ZLIB.INC - Interface to the general purpose compression library | * ZLIB.INC - Interface to the general purpose compression library | |||
* | * | |||
* ILE RPG400 version by Patrick Monnerat, DATASPHERE. | * ILE RPG400 version by Patrick Monnerat, DATASPHERE. | |||
* Version 1.2.8 | * Version 1.2.11 | |||
* | * | |||
* | * | |||
* WARNING: | * WARNING: | |||
* Procedures inflateInit(), inflateInit2(), deflateInit(), | * Procedures inflateInit(), inflateInit2(), deflateInit(), | |||
* deflateInit2() and inflateBackInit() need to be called with | * deflateInit2() and inflateBackInit() need to be called with | |||
* two additional arguments: | * two additional arguments: | |||
* the package version string and the stream control structure. | * the package version string and the stream control structure. | |||
* size. This is needed because RPG lacks some macro feature. | * size. This is needed because RPG lacks some macro feature. | |||
* Call these procedures as: | * Call these procedures as: | |||
* inflateInit(...: ZLIB_VERSION: %size(z_stream)) | * inflateInit(...: ZLIB_VERSION: %size(z_stream)) | |||
* | * | |||
/if not defined(ZLIB_H_) | /if not defined(ZLIB_H_) | |||
/define ZLIB_H_ | /define ZLIB_H_ | |||
* | * | |||
************************************************************************** | ************************************************************************** | |||
* Constants | * Constants | |||
************************************************************************** | ************************************************************************** | |||
* | * | |||
* Versioning information. | * Versioning information. | |||
* | * | |||
D ZLIB_VERSION C '1.2.8' | D ZLIB_VERSION C '1.2.11' | |||
D ZLIB_VERNUM C X'1280' | D ZLIB_VERNUM C X'12a0' | |||
D ZLIB_VER_MAJOR C 1 | D ZLIB_VER_MAJOR C 1 | |||
D ZLIB_VER_MINOR C 2 | D ZLIB_VER_MINOR C 2 | |||
D ZLIB_VER_REVISION... | D ZLIB_VER_REVISION... | |||
D C 8 | D C 11 | |||
D ZLIB_VER_SUBREVISION... | D ZLIB_VER_SUBREVISION... | |||
D C 0 | D C 0 | |||
* | * | |||
* Other equates. | * Other equates. | |||
* | * | |||
D Z_NO_FLUSH C 0 | D Z_NO_FLUSH C 0 | |||
D Z_PARTIAL_FLUSH... | D Z_PARTIAL_FLUSH... | |||
D C 1 | D C 1 | |||
D Z_SYNC_FLUSH C 2 | D Z_SYNC_FLUSH C 2 | |||
D Z_FULL_FLUSH C 3 | D Z_FULL_FLUSH C 3 | |||
skipping to change at line 53 | skipping to change at line 53 | |||
D Z_TREES C 6 | D Z_TREES C 6 | |||
* | * | |||
D Z_OK C 0 | D Z_OK C 0 | |||
D Z_STREAM_END C 1 | D Z_STREAM_END C 1 | |||
D Z_NEED_DICT C 2 | D Z_NEED_DICT C 2 | |||
D Z_ERRNO C -1 | D Z_ERRNO C -1 | |||
D Z_STREAM_ERROR C -2 | D Z_STREAM_ERROR C -2 | |||
D Z_DATA_ERROR C -3 | D Z_DATA_ERROR C -3 | |||
D Z_MEM_ERROR C -4 | D Z_MEM_ERROR C -4 | |||
D Z_BUF_ERROR C -5 | D Z_BUF_ERROR C -5 | |||
DZ_VERSION_ERROR C -6 | D Z_VERSION_ERROR C -6 | |||
* | * | |||
D Z_NO_COMPRESSION... | D Z_NO_COMPRESSION... | |||
D C 0 | D C 0 | |||
D Z_BEST_SPEED C 1 | D Z_BEST_SPEED C 1 | |||
D Z_BEST_COMPRESSION... | D Z_BEST_COMPRESSION... | |||
D C 9 | D C 9 | |||
D Z_DEFAULT_COMPRESSION... | D Z_DEFAULT_COMPRESSION... | |||
D C -1 | D C -1 | |||
* | * | |||
D Z_FILTERED C 1 | D Z_FILTERED C 1 | |||
skipping to change at line 83 | skipping to change at line 83 | |||
D Z_DEFLATED C 8 | D Z_DEFLATED C 8 | |||
* | * | |||
D Z_NULL C 0 | D Z_NULL C 0 | |||
* | * | |||
************************************************************************** | ************************************************************************** | |||
* Types | * Types | |||
************************************************************************** | ************************************************************************** | |||
* | * | |||
D z_streamp S * Stream struct ptr | D z_streamp S * Stream struct ptr | |||
D gzFile S * File pointer | D gzFile S * File pointer | |||
D gz_headerp S * | ||||
D z_off_t S 10i 0 Stream offsets | D z_off_t S 10i 0 Stream offsets | |||
D z_off64_t S 20i 0 Stream offsets | D z_off64_t S 20i 0 Stream offsets | |||
* | * | |||
************************************************************************** | ************************************************************************** | |||
* Structures | * Structures | |||
************************************************************************** | ************************************************************************** | |||
* | * | |||
* The GZIP encode/decode stream support structure. | * The GZIP encode/decode stream support structure. | |||
* | * | |||
D z_stream DS align based(z_streamp) | D z_stream DS align based(z_streamp) | |||
skipping to change at line 135 | skipping to change at line 136 | |||
* | * | |||
D compressBound PR 10U 0 extproc('compressBound') | D compressBound PR 10U 0 extproc('compressBound') | |||
D sourceLen 10U 0 value | D sourceLen 10U 0 value | |||
* | * | |||
D uncompress PR 10I 0 extproc('uncompress') | D uncompress PR 10I 0 extproc('uncompress') | |||
D dest 65535 options(*varsize) Destination buffer | D dest 65535 options(*varsize) Destination buffer | |||
D destLen 10U 0 Destination length | D destLen 10U 0 Destination length | |||
D source 65535 const options(*varsize) Source buffer | D source 65535 const options(*varsize) Source buffer | |||
D sourceLen 10U 0 value Source length | D sourceLen 10U 0 value Source length | |||
* | * | |||
D uncompress2 PR 10I 0 extproc('uncompress2') | ||||
D dest 65535 options(*varsize) | ||||
Destination buffer | ||||
D destLen 10U 0 | ||||
Destination length | ||||
D source 65535 const options(*varsize) | ||||
Source buffer | ||||
D sourceLen 10U 0 | ||||
Source length | ||||
* | ||||
/if not defined(LARGE_FILES) | /if not defined(LARGE_FILES) | |||
D gzopen PR extproc('gzopen') | D gzopen PR extproc('gzopen') | |||
D like(gzFile) | D like(gzFile) | |||
D path * value options(*string) File pathname | D path * value options(*string) File pathname | |||
D mode * value options(*string) Open mode | D mode * value options(*string) Open mode | |||
/else | /else | |||
D gzopen PR extproc('gzopen64') | D gzopen PR extproc('gzopen64') | |||
D like(gzFile) | D like(gzFile) | |||
D path * value options(*string) File pathname | D path * value options(*string) File pathname | |||
D mode * value options(*string) Open mode | D mode * value options(*string) Open mode | |||
skipping to change at line 171 | skipping to change at line 178 | |||
D gzsetparams PR 10I 0 extproc('gzsetparams') | D gzsetparams PR 10I 0 extproc('gzsetparams') | |||
D file value like(gzFile) File pointer | D file value like(gzFile) File pointer | |||
D level 10I 0 value | D level 10I 0 value | |||
D strategy 10I 0 value | D strategy 10I 0 value | |||
* | * | |||
D gzread PR 10I 0 extproc('gzread') | D gzread PR 10I 0 extproc('gzread') | |||
D file value like(gzFile) File pointer | D file value like(gzFile) File pointer | |||
D buf 65535 options(*varsize) Buffer | D buf 65535 options(*varsize) Buffer | |||
D len 10u 0 value Buffer length | D len 10u 0 value Buffer length | |||
* | * | |||
D gzfread PR 20I 0 extproc('gzfread') | ||||
D buf 65535 options(*varsize) | ||||
Buffer | ||||
D size 20u 0 value | ||||
Buffer length | ||||
D nitems 20u 0 value | ||||
Buffer length | ||||
D file value like(gzFile) | ||||
File pointer | ||||
* | ||||
D gzwrite PR 10I 0 extproc('gzwrite') | D gzwrite PR 10I 0 extproc('gzwrite') | |||
D file value like(gzFile) File pointer | D file value like(gzFile) File pointer | |||
D buf 65535 const options(*varsize) Buffer | D buf 65535 const options(*varsize) Buffer | |||
D len 10u 0 value Buffer length | D len 10u 0 value Buffer length | |||
* | * | |||
D gzfwrite PR 20I 0 extproc('gzfwrite') | ||||
D buf 65535 options(*varsize) | ||||
Buffer | ||||
D size 20u 0 value | ||||
Buffer length | ||||
D nitems 20u 0 value | ||||
Buffer length | ||||
D file value like(gzFile) | ||||
File pointer | ||||
* | ||||
D gzputs PR 10I 0 extproc('gzputs') | D gzputs PR 10I 0 extproc('gzputs') | |||
D file value like(gzFile) File pointer | D file value like(gzFile) File pointer | |||
D s * value options(*string) String to output | D s * value options(*string) String to output | |||
* | * | |||
D gzgets PR * extproc('gzgets') | D gzgets PR * extproc('gzgets') | |||
D file value like(gzFile) File pointer | D file value like(gzFile) File pointer | |||
D buf 65535 options(*varsize) Read buffer | D buf 65535 options(*varsize) Read buffer | |||
D len 10i 0 value Buffer length | D len 10i 0 value Buffer length | |||
* | * | |||
D gzputc PR 10i 0 extproc('gzputc') | D gzputc PR 10i 0 extproc('gzputc') | |||
skipping to change at line 257 | skipping to change at line 276 | |||
D file value like(gzFile) File pointer | D file value like(gzFile) File pointer | |||
* | * | |||
D gzoffset64 PR extproc('gzoffset64') | D gzoffset64 PR extproc('gzoffset64') | |||
D like(z_off64_t) | D like(z_off64_t) | |||
D file value like(gzFile) File pointer | D file value like(gzFile) File pointer | |||
/endif | /endif | |||
* | * | |||
D gzeof PR 10i 0 extproc('gzeof') | D gzeof PR 10i 0 extproc('gzeof') | |||
D file value like(gzFile) File pointer | D file value like(gzFile) File pointer | |||
* | * | |||
D gzdirect PR 10i 0 extproc('gzdirect') | ||||
D file value like(gzFile) | ||||
File pointer | ||||
* | ||||
D gzclose_r PR 10i 0 extproc('gzclose_r') | D gzclose_r PR 10i 0 extproc('gzclose_r') | |||
D file value like(gzFile) File pointer | D file value like(gzFile) File pointer | |||
* | * | |||
D gzclose_w PR 10i 0 extproc('gzclose_w') | D gzclose_w PR 10i 0 extproc('gzclose_w') | |||
D file value like(gzFile) File pointer | D file value like(gzFile) File pointer | |||
* | * | |||
D gzclose PR 10i 0 extproc('gzclose') | D gzclose PR 10i 0 extproc('gzclose') | |||
D file value like(gzFile) File pointer | D file value like(gzFile) File pointer | |||
* | * | |||
D gzerror PR * extproc('gzerror') Error string | D gzerror PR * extproc('gzerror') Error string | |||
skipping to change at line 314 | skipping to change at line 336 | |||
************************************************************************** | ************************************************************************** | |||
* Advanced function prototypes | * Advanced function prototypes | |||
************************************************************************** | ************************************************************************** | |||
* | * | |||
D deflateInit2 PR 10I 0 extproc('deflateInit2_') Init. compression | D deflateInit2 PR 10I 0 extproc('deflateInit2_') Init. compression | |||
D strm like(z_stream) Compression stream | D strm like(z_stream) Compression stream | |||
D level 10I 0 value Compression level | D level 10I 0 value Compression level | |||
D method 10I 0 value Compression method | D method 10I 0 value Compression method | |||
D windowBits 10I 0 value log2(window size) | D windowBits 10I 0 value log2(window size) | |||
D memLevel 10I 0 value Mem/cmpress tradeoff | D memLevel 10I 0 value Mem/cmpress tradeoff | |||
D strategy 10I 0 value Compression stategy | D strategy 10I 0 value Compression strategy | |||
D version * value options(*string) Version string | D version * value options(*string) Version string | |||
D stream_size 10i 0 value Stream struct. size | D stream_size 10i 0 value Stream struct. size | |||
* | * | |||
D deflateSetDictionary... | D deflateSetDictionary... | |||
D PR 10I 0 extproc('deflateSetDictionary') Init. dictionary | D PR 10I 0 extproc('deflateSetDictionary') Init. dictionary | |||
D strm like(z_stream) Compression stream | D strm like(z_stream) Compression stream | |||
D dictionary 65535 const options(*varsize) Dictionary bytes | D dictionary 65535 const options(*varsize) Dictionary bytes | |||
D dictLength 10U 0 value Dictionary length | D dictLength 10U 0 value Dictionary length | |||
* | * | |||
D deflateCopy PR 10I 0 extproc('deflateCopy') Compress strm 2 strm | D deflateCopy PR 10I 0 extproc('deflateCopy') Compress strm 2 strm | |||
D dest like(z_stream) Destination stream | D dest like(z_stream) Destination stream | |||
D source like(z_stream) Source stream | D source like(z_stream) Source stream | |||
* | * | |||
D deflateReset PR 10I 0 extproc('deflateReset') End and init. stream | D deflateReset PR 10I 0 extproc('deflateReset') End and init. stream | |||
D strm like(z_stream) Compression stream | D strm like(z_stream) Compression stream | |||
* | * | |||
D deflateParams PR 10I 0 extproc('deflateParams') Change level & strat | D deflateParams PR 10I 0 extproc('deflateParams') Change level & strat | |||
D strm like(z_stream) Compression stream | D strm like(z_stream) Compression stream | |||
D level 10I 0 value Compression level | D level 10I 0 value Compression level | |||
D strategy 10I 0 value | D strategy 10I 0 value | |||
Compression stategy | Compression strategy | |||
* | ||||
D deflateTune PR 10I 0 extproc('deflateTune') | ||||
D strm like(z_stream) | ||||
Compression stream | ||||
D good 10I 0 value | ||||
D lazy 10I 0 value | ||||
D nice 10I 0 value | ||||
D chain 10I 0 value | ||||
* | * | |||
D deflateBound PR 10U 0 extproc('deflateBound') Change level & strat | D deflateBound PR 10U 0 extproc('deflateBound') Change level & strat | |||
D strm like(z_stream) Compression stream | D strm like(z_stream) Compression stream | |||
D sourcelen 10U 0 value Compression level | D sourcelen 10U 0 value Compression level | |||
* | * | |||
D deflatePending PR 10I 0 extproc('deflatePending') Change level & strat | D deflatePending PR 10I 0 extproc('deflatePending') Change level & strat | |||
D strm like(z_stream) Compression stream | D strm like(z_stream) Compression stream | |||
D pending 10U 0 Pending bytes | D pending 10U 0 Pending bytes | |||
D bits 10I 0 Pending bits | D bits 10I 0 Pending bits | |||
* | * | |||
skipping to change at line 368 | skipping to change at line 397 | |||
D strm like(z_stream) Expansion stream | D strm like(z_stream) Expansion stream | |||
D dictionary 65535 const options(*varsize) Dictionary bytes | D dictionary 65535 const options(*varsize) Dictionary bytes | |||
D dictLength 10U 0 value Dictionary length | D dictLength 10U 0 value Dictionary length | |||
* | * | |||
D inflateGetDictionary... | D inflateGetDictionary... | |||
D PR 10I 0 extproc('inflateGetDictionary') Get dictionary | D PR 10I 0 extproc('inflateGetDictionary') Get dictionary | |||
D strm like(z_stream) Expansion stream | D strm like(z_stream) Expansion stream | |||
D dictionary 65535 options(*varsize) Dictionary bytes | D dictionary 65535 options(*varsize) Dictionary bytes | |||
D dictLength 10U 0 Dictionary length | D dictLength 10U 0 Dictionary length | |||
* | * | |||
D deflateGetDictionary... | ||||
D PR 10I 0 extproc('deflateGetDictionary') | ||||
Get dictionary | ||||
D strm like(z_stream) | ||||
Expansion stream | ||||
D dictionary 65535 options(*varsize) | ||||
Dictionary bytes | ||||
D dictLength 10U 0 | ||||
Dictionary length | ||||
* | ||||
D inflateSync PR 10I 0 extproc('inflateSync') Sync. expansion | D inflateSync PR 10I 0 extproc('inflateSync') Sync. expansion | |||
D strm like(z_stream) Expansion stream | D strm like(z_stream) Expansion stream | |||
* | * | |||
D inflateCopy PR 10I 0 extproc('inflateCopy') | D inflateCopy PR 10I 0 extproc('inflateCopy') | |||
D dest like(z_stream) Destination stream | D dest like(z_stream) Destination stream | |||
D source like(z_stream) Source stream | D source like(z_stream) Source stream | |||
* | * | |||
D inflateReset PR 10I 0 extproc('inflateReset') End and init. stream | D inflateReset PR 10I 0 extproc('inflateReset') End and init. stream | |||
D strm like(z_stream) Expansion stream | D strm like(z_stream) Expansion stream | |||
* | * | |||
skipping to change at line 390 | skipping to change at line 425 | |||
D windowBits 10I 0 value Log2(buffer size) | D windowBits 10I 0 value Log2(buffer size) | |||
* | * | |||
D inflatePrime PR 10I 0 extproc('inflatePrime') Insert bits | D inflatePrime PR 10I 0 extproc('inflatePrime') Insert bits | |||
D strm like(z_stream) Expansion stream | D strm like(z_stream) Expansion stream | |||
D bits 10I 0 value Bit count | D bits 10I 0 value Bit count | |||
D value 10I 0 value Bits to insert | D value 10I 0 value Bits to insert | |||
* | * | |||
D inflateMark PR 10I 0 extproc('inflateMark') Get inflate info | D inflateMark PR 10I 0 extproc('inflateMark') Get inflate info | |||
D strm like(z_stream) Expansion stream | D strm like(z_stream) Expansion stream | |||
* | * | |||
D inflateCodesUsed... | ||||
PR 20U 0 extproc('inflateCodesUsed') | ||||
D strm like(z_stream) | ||||
Expansion stream | ||||
* | ||||
D inflateValidate... | ||||
PR 20U 0 extproc('inflateValidate') | ||||
D strm like(z_stream) | ||||
Expansion stream | ||||
D check 10I 0 value | ||||
* | ||||
D inflateGetHeader... | ||||
PR 10U 0 extproc('inflateGetHeader') | ||||
D strm like(z_stream) | ||||
Expansion stream | ||||
D head like(gz_headerp) | ||||
* | ||||
D deflateSetHeader... | ||||
PR 10U 0 extproc('deflateSetHeader') | ||||
D strm like(z_stream) | ||||
Expansion stream | ||||
D head like(gz_headerp) | ||||
* | ||||
D inflateBackInit... | D inflateBackInit... | |||
D PR 10I 0 extproc('inflateBackInit_') | D PR 10I 0 extproc('inflateBackInit_') | |||
D strm like(z_stream) Expansion stream | D strm like(z_stream) Expansion stream | |||
D windowBits 10I 0 value Log2(buffer size) | D windowBits 10I 0 value Log2(buffer size) | |||
D window 65535 options(*varsize) Buffer | D window 65535 options(*varsize) Buffer | |||
D version * value options(*string) Version string | D version * value options(*string) Version string | |||
D stream_size 10i 0 value Stream struct. size | D stream_size 10i 0 value Stream struct. size | |||
* | * | |||
D inflateBack PR 10I 0 extproc('inflateBack') | D inflateBack PR 10I 0 extproc('inflateBack') | |||
D strm like(z_stream) Expansion stream | D strm like(z_stream) Expansion stream | |||
skipping to change at line 420 | skipping to change at line 474 | |||
* | * | |||
************************************************************************** | ************************************************************************** | |||
* Checksum function prototypes | * Checksum function prototypes | |||
************************************************************************** | ************************************************************************** | |||
* | * | |||
D adler32 PR 10U 0 extproc('adler32') New checksum | D adler32 PR 10U 0 extproc('adler32') New checksum | |||
D adler 10U 0 value Old checksum | D adler 10U 0 value Old checksum | |||
D buf 65535 const options(*varsize) Bytes to accumulate | D buf 65535 const options(*varsize) Bytes to accumulate | |||
D len 10U 0 value Buffer length | D len 10U 0 value Buffer length | |||
* | * | |||
D adler32_combine... | ||||
PR 10U 0 extproc('adler32_combine') | ||||
New checksum | ||||
D adler1 10U 0 value | ||||
Old checksum | ||||
D adler2 10U 0 value | ||||
Old checksum | ||||
D len2 20U 0 value | ||||
Buffer length | ||||
* | ||||
D adler32_z PR 10U 0 extproc('adler32_z') | ||||
New checksum | ||||
D adler 10U 0 value | ||||
Old checksum | ||||
D buf 65535 const options(*varsize) | ||||
Bytes to accumulate | ||||
D len 20U 0 value | ||||
Buffer length | ||||
* | ||||
D crc32 PR 10U 0 extproc('crc32') New checksum | D crc32 PR 10U 0 extproc('crc32') New checksum | |||
D crc 10U 0 value Old checksum | D crc 10U 0 value Old checksum | |||
D buf 65535 const options(*varsize) Bytes to accumulate | D buf 65535 const options(*varsize) Bytes to accumulate | |||
D len 10U 0 value Buffer length | D len 10U 0 value Buffer length | |||
* | * | |||
D crc32_combine... | ||||
PR 10U 0 extproc('crc32_combine') | ||||
New checksum | ||||
D crc1 10U 0 value | ||||
Old checksum | ||||
D crc2 10U 0 value | ||||
Old checksum | ||||
D len2 20U 0 value | ||||
Buffer length | ||||
* | ||||
D crc32_z PR 10U 0 extproc('crc32_z') | ||||
New checksum | ||||
D crc 10U 0 value | ||||
Old checksum | ||||
D buf 65535 const options(*varsize) | ||||
Bytes to accumulate | ||||
D len 20U 0 value | ||||
Buffer length | ||||
* | ||||
************************************************************************** | ************************************************************************** | |||
* Miscellaneous function prototypes | * Miscellaneous function prototypes | |||
************************************************************************** | ************************************************************************** | |||
* | * | |||
D zError PR * extproc('zError') Error string | D zError PR * extproc('zError') Error string | |||
D err 10I 0 value Error code | D err 10I 0 value Error code | |||
* | * | |||
D inflateSyncPoint... | D inflateSyncPoint... | |||
D PR 10I 0 extproc('inflateSyncPoint') | D PR 10I 0 extproc('inflateSyncPoint') | |||
D strm like(z_stream) Expansion stream | D strm like(z_stream) Expansion stream | |||
End of changes. 15 change blocks. | ||||
8 lines changed or deleted | 122 lines changed or added |