Zlib API version 20200929 exposes basic compression, decompression, and checksum calls. More...
#include "zlibapi.h"
Data Fields | |
uLong(* | adler32 )(uLong adler, const Bytef *buf, uInt len) |
Update an Adler-32 checksum with bytes from a buffer. More... | |
uLong(* | compressBound )(uLong sourceLen) |
Return an upper bound on the compressed size, assuming data is compressed in one step with the default compression level. More... | |
uLong(* | crc32 )(uLong crc, const Bytef *buf, uInt len) |
Update a CRC-32 checksum with bytes from a buffer. More... | |
int(* | deflate )(z_streamp strm, int flush) |
Compress as much data as possible. More... | |
int(* | deflateEnd )(z_streamp strm) |
Discard and destroy a compression stream. More... | |
int(* | deflateInit )(z_streamp strm, int level) |
Initializes a stream for compression. More... | |
int(* | deflateInit2 )(z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy) |
Initializes a stream for compression with options. More... | |
int(* | deflateParams )(z_streamp strm, int level, int strategy) |
Change parameters on a compression stream. More... | |
int(* | deflateReset )(z_streamp strm) |
End and re-initialize a stream for compression. More... | |
int(* | inflate )(z_streamp strm, int flush) |
Decompress as much data as possible. More... | |
int(* | inflateInit )(z_streamp strm) |
Initializes a stream for decompression. More... | |
int(* | inflateInit2 )(z_streamp strm, int windowBits) |
Initializes a stream for decompression with options. More... | |
int(* | inflateEnd )(z_streamp strm) |
Discard and destroy a decompression stream. More... | |
int(* | inflateReset )(z_streamp strm) |
End and re-initialize a stream for decompression. More... | |
int(* | inflateReset2 )(z_streamp strm, int windowBits) |
End and re-initialize a stream for decompression with options. More... | |
int(* | inflateSync )(z_streamp strm) |
Skips invalid compressed data until a possible point to resume decompression is reached. More... | |
int(* | inflateValidate )(z_streamp strm, int check) |
Check if a stream structure is consistent. More... | |
Zlib API version 20200929 exposes basic compression, decompression, and checksum calls.
uLong( * sw_zlib_api_20200929::adler32) (uLong adler, const Bytef *buf, uInt len) |
Update an Adler-32 checksum with bytes from a buffer.
[in] | adler | Checksum to update. |
[in] | buf | Pointer to bytes to update checksum with. |
[in] | len | The number of bytes in buf. |
See the Zlib manual for more detail.
uLong( * sw_zlib_api_20200929::compressBound) (uLong sourceLen) |
Return an upper bound on the compressed size, assuming data is compressed in one step with the default compression level.
[in] | sourceLen | Length of input data |
See the Zlib manual for more detail.
uLong( * sw_zlib_api_20200929::crc32) (uLong crc, const Bytef *buf, uInt len) |
Update a CRC-32 checksum with bytes from a buffer.
[in] | crc | Checksum to update. |
[in] | buf | Pointer to bytes to update checksum with. |
[in] | len | The number of bytes in buf. |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::deflate) (z_streamp strm, int flush) |
Compress as much data as possible.
[in] | strm | The stream to compress, taking up to avail_in bytes from the next_in location. |
[in] | flush | One of Z_NO_FLUSH , Z_SYNC_FLUSH , Z_PARTIAL_FLUSH , Z_BLOCK , Z_FULL_FLUSH or Z_FINISH . |
Z_OK | if progress was made |
Z_STREAM_END | if all input has been consumed and all output produced |
Z_BUF_ERROR | if no progress was possible |
Z_STREAM_ERROR | if the stream state was inconsistent |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::deflateEnd) (z_streamp strm) |
Discard and destroy a compression stream.
[in] | strm | The stream to destroy. |
Z_OK | on success |
Z_DATA_ERROR | if the stream was destroyed with input pending or output unprocessed |
Z_STREAM_ERROR | if the stream state was inconsistent |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::deflateInit) (z_streamp strm, int level) |
Initializes a stream for compression.
[in] | strm | The stream to compress. The zalloc , zfree and opaque fields must be initialized by the caller. Global Graphics recommends setting the zalloc and zfree fields to allocator and deallocator functions that use memory from the RIP or skin's MPS pools. The SwAlloc() and SwFree() functions allocate and free memory from the core RIP's pools. The MemAlloc() and MemFree() functions allocate and free memory from the SDK's pools. |
[in] | level | The compression level, from 0 (no compression) to 9 (best compression). Z_DEFAULT_COMPRESSION uses a compromise between speed and size. |
Z_OK | on success |
Z_MEM_ERROR | if memory allocation failed |
Z_STREAM_ERROR | if the compression level is invalid |
Z_VERSION_ERROR | if the library version is incompatible with the version assumed by the caller. |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::deflateInit2) (z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy) |
Initializes a stream for compression with options.
[in] | strm | The stream to compress. The zalloc , zfree and opaque fields must be initialized by the caller. Global Graphics recommends setting the zalloc and zfree fields to allocator and deallocator functions that use memory from the RIP or skin's MPS pools. The SwAlloc() and SwFree() functions allocate and free memory from the core RIP's pools. The MemAlloc() and MemFree() functions allocate and free memory from the SDK's pools. |
[in] | level | The compression level, from 0 (no compression) to 9 (best compression). Z_DEFAULT_COMPRESSION uses a compromise between speed and size. |
[in] | method | This must be Z_DEFLATED . |
[in] | windowBits | Base 2 logarithm of the size of the compression history buffer, in the range 8-15. |
[in] | memLevel | How much memory should be allocated for internal compression state, from 1 (minimum) to 9 (maximum). |
[in] | strategy | One of Z_DEFAULT_STRATEGY ; Z_FILTERED ; Z_HUFFMAN_ONLY , or Z_RLE . |
Z_OK | on success |
Z_MEM_ERROR | if memory allocation failed |
Z_STREAM_ERROR | if the compression level is invalid |
Z_VERSION_ERROR | if the library version is incompatible with the version assumed by the caller. |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::deflateParams) (z_streamp strm, int level, int strategy) |
Change parameters on a compression stream.
[in] | strm | The stream to change parameters on. |
[in] | level | The compression level, from 0 (no compression) to 9 (best compression). Z_DEFAULT_COMPRESSION uses a compromise between speed and size. |
[in] | strategy | One of Z_DEFAULT_STRATEGY ; Z_FILTERED ; Z_HUFFMAN_ONLY , or Z_RLE . |
Z_OK | on success |
Z_STREAM_ERROR | if the stream state was inconsistent |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::deflateReset) (z_streamp strm) |
End and re-initialize a stream for compression.
This call is equivalent to deflateEnd() followed by deflateInit(), but does not free and reallocate the internal compression state or parameters.
[in] | strm | The stream to reset. |
Z_OK | on success |
Z_STREAM_ERROR | if the stream state was inconsistent |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::inflate) (z_streamp strm, int flush) |
Decompress as much data as possible.
[in] | strm | The stream to decompress. |
[in] | flush | One of Z_NO_FLUSH , Z_SYNC_FLUSH , Z_BLOCK , Z_TREES or Z_FINISH . |
Z_OK | if progress was made |
Z_STREAM_END | if the end of the compressed data has been reached and all uncompressed output has been produced |
Z_BUF_ERROR | if no progress was possible |
Z_MEM_ERROR | if memory allocation failed |
Z_STREAM_ERROR | if the stream state was inconsistent |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::inflateEnd) (z_streamp strm) |
Discard and destroy a decompression stream.
[in] | strm | The stream to destroy. |
Z_OK | on success |
Z_STREAM_ERROR | if the stream state was inconsistent |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::inflateInit) (z_streamp strm) |
Initializes a stream for decompression.
[in] | strm | The stream to decompress. The next_in , avail_in , zalloc , zfree and opaque fields must be initialized by the caller. Global Graphics recommends setting the zalloc and zfree fields to allocator and deallocator functions that use memory from the RIP or skin's MPS pools. The SwAlloc() and SwFree() functions allocate and free memory from the core RIP's pools. The MemAlloc() and MemFree() functions allocate and free memory from the SDK's pools. |
Z_OK | on success |
Z_MEM_ERROR | if memory allocation failed |
Z_VERSION_ERROR | if the library version is incompatible with the version assumed by the caller. |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::inflateInit2) (z_streamp strm, int windowBits) |
Initializes a stream for decompression with options.
[in] | strm | The stream to decompress. The next_in , avail_in , zalloc , zfree and opaque fields must be initialized by the caller. Global Graphics recommends setting the zalloc and zfree fields to allocator and deallocator functions that use memory from the RIP or skin's MPS pools. The SwAlloc() and SwFree() functions allocate and free memory from the core RIP's pools. The MemAlloc() and MemFree() functions allocate and free memory from the SDK's pools. |
[in] | windowBits | Base 2 logarithm of the size of the compression history buffer, in the range 8-15, or 0 to use the value in the compressed stream. |
Z_OK | on success |
Z_MEM_ERROR | if memory allocation failed |
Z_STREAM_ERROR | if the parameters are invalid |
Z_VERSION_ERROR | if the library version is incompatible with the version assumed by the caller. |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::inflateReset) (z_streamp strm) |
End and re-initialize a stream for decompression.
This call is equivalent to inflateEnd() followed by inflateInit(), but does not free and reallocate the internal decompression state or parameters.
[in] | strm | The stream to reset. |
Z_OK | on success |
Z_STREAM_ERROR | if the stream state was inconsistent |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::inflateReset2) (z_streamp strm, int windowBits) |
End and re-initialize a stream for decompression with options.
This call is equivalent to inflateEnd() followed by inflateInit(), but does not free and reallocate the internal decompression state or parameters.
[in] | strm | The stream to reset. |
[in] | windowBits | Base 2 logarithm of the size of the compression history buffer, in the range 8-15, or 0 to use the value in the compressed stream. |
Z_OK | on success |
Z_STREAM_ERROR | if the stream state was inconsistent or the windowBits parameter was invalid. |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::inflateSync) (z_streamp strm) |
Skips invalid compressed data until a possible point to resume decompression is reached.
[in] | strm | The stream to resynchronize. |
Z_OK | if a possible resumption point was found |
Z_BUF_ERROR | if no more input was provided |
Z_DATA_ERROR | if no resumption point was found |
Z_STREAM_ERROR | if stream structure was inconsistent |
See the Zlib manual for more detail.
int( * sw_zlib_api_20200929::inflateValidate) (z_streamp strm, int check) |
Check if a stream structure is consistent.
[in] | strm | The stream to validate. |
[in] | check | A boolean indicating whether to set or unset the stream's validation mark. |
Z_OK | on success |
Z_STREAM_ERROR | if stream structure was inconsistent |