URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [zlib/] [as400/] [zlib.inc] - Rev 745
Compare with Previous | Blame | View Log
* ZLIB.INC - Interface to the general purpose compression library** ILE RPG400 version by Patrick Monnerat, DATASPHERE.* Version 1.2.3*** WARNING:* Procedures inflateInit(), inflateInit2(), deflateInit(),* deflateInit2() and inflateBackInit() need to be called with* two additional arguments:* the package version string and the stream control structure.* size. This is needed because RPG lacks some macro feature.* Call these procedures as:* inflateInit(...: ZLIB_VERSION: %size(z_stream))*/if not defined(ZLIB_H_)/define ZLIB_H_**************************************************************************** Constants**************************************************************************** Versioning information.*D ZLIB_VERSION C '1.2.3'D ZLIB_VERNUM C X'1230'** Other equates.*D Z_NO_FLUSH C 0D Z_SYNC_FLUSH C 2D Z_FULL_FLUSH C 3D Z_FINISH C 4D Z_BLOCK C 5*D Z_OK C 0D Z_STREAM_END C 1D Z_NEED_DICT C 2D Z_ERRNO C -1D Z_STREAM_ERROR C -2D Z_DATA_ERROR C -3D Z_MEM_ERROR C -4D Z_BUF_ERROR C -5DZ_VERSION_ERROR C -6*D Z_NO_COMPRESSION...D C 0D Z_BEST_SPEED C 1D Z_BEST_COMPRESSION...D C 9D Z_DEFAULT_COMPRESSION...D C -1*D Z_FILTERED C 1D Z_HUFFMAN_ONLY C 2D Z_RLE C 3D Z_DEFAULT_STRATEGY...D C 0*D Z_BINARY C 0D Z_ASCII C 1D Z_UNKNOWN C 2*D Z_DEFLATED C 8*D Z_NULL C 0**************************************************************************** Types***************************************************************************D z_streamp S * Stream struct ptrD gzFile S * File pointerD z_off_t S 10i 0 Stream offsets**************************************************************************** Structures**************************************************************************** The GZIP encode/decode stream support structure.*D z_stream DS align based(z_streamp)D zs_next_in * Next input byteD zs_avail_in 10U 0 Byte cnt at next_inD zs_total_in 10U 0 Total bytes readD zs_next_out * Output buffer ptrD zs_avail_out 10U 0 Room left @ next_outD zs_total_out 10U 0 Total bytes writtenD zs_msg * Last errmsg or nullD zs_state * Internal stateD zs_zalloc * procptr Int. state allocatorD zs_free * procptr Int. state dealloc.D zs_opaque * Private alloc. dataD zs_data_type 10i 0 ASC/BIN best guessD zs_adler 10u 0 Uncompr. adler32 valD 10U 0 ReservedD 10U 0 Ptr. alignment**************************************************************************** Utility function prototypes***************************************************************************D compress PR 10I 0 extproc('compress')D dest 32767 options(*varsize) Destination bufferD destLen 10U 0 Destination lengthD source 32767 const options(*varsize) Source bufferD sourceLen 10u 0 value Source length*D compress2 PR 10I 0 extproc('compress2')D dest 32767 options(*varsize) Destination bufferD destLen 10U 0 Destination lengthD source 32767 const options(*varsize) Source bufferD sourceLen 10U 0 value Source lengthD level 10I 0 value Compression level*D compressBound PR 10U 0 extproc('compressBound')D sourceLen 10U 0 value*D uncompress PR 10I 0 extproc('uncompress')D dest 32767 options(*varsize) Destination bufferD destLen 10U 0 Destination lengthD source 32767 const options(*varsize) Source bufferD sourceLen 10U 0 value Source length*D gzopen PR extproc('gzopen')D like(gzFile)D path * value options(*string) File pathnameD mode * value options(*string) Open mode*D gzdopen PR extproc('gzdopen')D like(gzFile)D fd 10i 0 value File descriptorD mode * value options(*string) Open mode*D gzsetparams PR 10I 0 extproc('gzsetparams')D file value like(gzFile) File pointerD level 10I 0 valueD strategy 10i 0 value*D gzread PR 10I 0 extproc('gzread')D file value like(gzFile) File pointerD buf 32767 options(*varsize) BufferD len 10u 0 value Buffer length*D gzwrite PR 10I 0 extproc('gzwrite')D file value like(gzFile) File pointerD buf 32767 const options(*varsize) BufferD len 10u 0 value Buffer length*D gzputs PR 10I 0 extproc('gzputs')D file value like(gzFile) File pointerD s * value options(*string) String to output*D gzgets PR * extproc('gzgets')D file value like(gzFile) File pointerD buf 32767 options(*varsize) Read bufferD len 10i 0 value Buffer length*D gzflush PR 10i 0 extproc('gzflush')D file value like(gzFile) File pointerD flush 10I 0 value Type of flush*D gzseek PR extproc('gzseek')D like(z_off_t)D file value like(gzFile) File pointerD offset value like(z_off_t) OffsetD whence 10i 0 value Origin*D gzrewind PR 10i 0 extproc('gzrewind')D file value like(gzFile) File pointer*D gztell PR extproc('gztell')D like(z_off_t)D file value like(gzFile) File pointer*D gzeof PR 10i 0 extproc('gzeof')D file value like(gzFile) File pointer*D gzclose PR 10i 0 extproc('gzclose')D file value like(gzFile) File pointer*D gzerror PR * extproc('gzerror') Error stringD file value like(gzFile) File pointerD errnum 10I 0 Error code*D gzclearerr PR extproc('gzclearerr')D file value like(gzFile) File pointer**************************************************************************** Basic function prototypes***************************************************************************D zlibVersion PR * extproc('zlibVersion') Version string*D deflateInit PR 10I 0 extproc('deflateInit_') Init. compressionD strm like(z_stream) Compression streamD level 10I 0 value Compression levelD version * value options(*string) Version stringD stream_size 10i 0 value Stream struct. size*D deflate PR 10I 0 extproc('deflate') Compress dataD strm like(z_stream) Compression streamD flush 10I 0 value Flush type required*D deflateEnd PR 10I 0 extproc('deflateEnd') Termin. compressionD strm like(z_stream) Compression stream*D inflateInit PR 10I 0 extproc('inflateInit_') Init. expansionD strm like(z_stream) Expansion streamD version * value options(*string) Version stringD stream_size 10i 0 value Stream struct. size*D inflate PR 10I 0 extproc('inflate') Expand dataD strm like(z_stream) Expansion streamD flush 10I 0 value Flush type required*D inflateEnd PR 10I 0 extproc('inflateEnd') Termin. expansionD strm like(z_stream) Expansion stream**************************************************************************** Advanced function prototypes***************************************************************************D deflateInit2 PR 10I 0 extproc('deflateInit2_') Init. compressionD strm like(z_stream) Compression streamD level 10I 0 value Compression levelD method 10I 0 value Compression methodD windowBits 10I 0 value log2(window size)D memLevel 10I 0 value Mem/cmpress tradeoffD strategy 10I 0 value Compression stategyD version * value options(*string) Version stringD stream_size 10i 0 value Stream struct. size*D deflateSetDictionary...D PR 10I 0 extproc('deflateSetDictionary') Init. dictionaryD strm like(z_stream) Compression streamD dictionary 32767 const options(*varsize) Dictionary bytesD dictLength 10U 0 value Dictionary length*D deflateCopy PR 10I 0 extproc('deflateCopy') Compress strm 2 strmD dest like(z_stream) Destination streamD source like(z_stream) Source stream*D deflateReset PR 10I 0 extproc('deflateReset') End and init. streamD strm like(z_stream) Compression stream*D deflateParams PR 10I 0 extproc('deflateParams') Change level & stratD strm like(z_stream) Compression streamD level 10I 0 value Compression levelD strategy 10I 0 value Compression stategy*D deflateBound PR 10U 0 extproc('deflateBound') Change level & stratD strm like(z_stream) Compression streamD sourcelen 10U 0 value Compression level*D deflatePrime PR 10I 0 extproc('deflatePrime') Change level & stratD strm like(z_stream) Compression streamD bits 10I 0 value Number of bits to insertD value 10I 0 value Bits to insert*D inflateInit2 PR 10I 0 extproc('inflateInit2_') Init. expansionD strm like(z_stream) Expansion streamD windowBits 10I 0 value log2(window size)D version * value options(*string) Version stringD stream_size 10i 0 value Stream struct. size*D inflateSetDictionary...D PR 10I 0 extproc('inflateSetDictionary') Init. dictionaryD strm like(z_stream) Expansion streamD dictionary 32767 const options(*varsize) Dictionary bytesD dictLength 10U 0 value Dictionary length*D inflateSync PR 10I 0 extproc('inflateSync') Sync. expansionD strm like(z_stream) Expansion stream*D inflateCopy PR 10I 0 extproc('inflateCopy')D dest like(z_stream) Destination streamD source like(z_stream) Source stream*D inflateReset PR 10I 0 extproc('inflateReset') End and init. streamD strm like(z_stream) Expansion stream*D inflateBackInit...D PR 10I 0 extproc('inflateBackInit_')D strm like(z_stream) Expansion streamD windowBits 10I 0 value Log2(buffer size)D window 32767 options(*varsize) BufferD version * value options(*string) Version stringD stream_size 10i 0 value Stream struct. size*D inflateBack PR 10I 0 extproc('inflateBack')D strm like(z_stream) Expansion streamD in * value procptr Input functionD in_desc * value Input descriptorD out * value procptr Output functionD out_desc * value Output descriptor*D inflateBackEnd PR 10I 0 extproc('inflateBackEnd')D strm like(z_stream) Expansion stream*D zlibCompileFlags...D PR 10U 0 extproc('zlibCompileFlags')**************************************************************************** Checksum function prototypes***************************************************************************D adler32 PR 10U 0 extproc('adler32') New checksumD adler 10U 0 value Old checksumD buf 32767 const options(*varsize) Bytes to accumulateD len 10U 0 value Buffer length*D crc32 PR 10U 0 extproc('crc32') New checksumD crc 10U 0 value Old checksumD buf 32767 const options(*varsize) Bytes to accumulateD len 10U 0 value Buffer length**************************************************************************** Miscellaneous function prototypes***************************************************************************D zError PR * extproc('zError') Error stringD err 10I 0 value Error code*D inflateSyncPoint...D PR 10I 0 extproc('inflateSyncPoint')D strm like(z_stream) Expansion stream*D get_crc_table PR * extproc('get_crc_table') Ptr to ulongs*/endif
