Harlequin RIP SDK
sw_zlib_api_20200929 Struct Reference

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...
 

Detailed Description

Zlib API version 20200929 exposes basic compression, decompression, and checksum calls.

Field Documentation

◆ adler32

uLong( * sw_zlib_api_20200929::adler32) (uLong adler, const Bytef *buf, uInt len)

Update an Adler-32 checksum with bytes from a buffer.

Parameters
[in]adlerChecksum to update.
[in]bufPointer to bytes to update checksum with.
[in]lenThe number of bytes in buf.
Returns
The updated checksum.

See the Zlib manual for more detail.

◆ compressBound

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.

Parameters
[in]sourceLenLength of input data
Returns
Upper bound of compressed size.

See the Zlib manual for more detail.

◆ crc32

uLong( * sw_zlib_api_20200929::crc32) (uLong crc, const Bytef *buf, uInt len)

Update a CRC-32 checksum with bytes from a buffer.

Parameters
[in]crcChecksum to update.
[in]bufPointer to bytes to update checksum with.
[in]lenThe number of bytes in buf.
Returns
The updated checksum.

See the Zlib manual for more detail.

◆ deflate

int( * sw_zlib_api_20200929::deflate) (z_streamp strm, int flush)

Compress as much data as possible.

Parameters
[in]strmThe stream to compress, taking up to avail_in bytes from the next_in location.
[in]flushOne of Z_NO_FLUSH, Z_SYNC_FLUSH, Z_PARTIAL_FLUSH, Z_BLOCK, Z_FULL_FLUSH or Z_FINISH.
Return values
Z_OKif progress was made
Z_STREAM_ENDif all input has been consumed and all output produced
Z_BUF_ERRORif no progress was possible
Z_STREAM_ERRORif the stream state was inconsistent

See the Zlib manual for more detail.

◆ deflateEnd

int( * sw_zlib_api_20200929::deflateEnd) (z_streamp strm)

Discard and destroy a compression stream.

Parameters
[in]strmThe stream to destroy.
Return values
Z_OKon success
Z_DATA_ERRORif the stream was destroyed with input pending or output unprocessed
Z_STREAM_ERRORif the stream state was inconsistent

See the Zlib manual for more detail.

◆ deflateInit

int( * sw_zlib_api_20200929::deflateInit) (z_streamp strm, int level)

Initializes a stream for compression.

Parameters
[in]strmThe 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]levelThe compression level, from 0 (no compression) to 9 (best compression). Z_DEFAULT_COMPRESSION uses a compromise between speed and size.
Return values
Z_OKon success
Z_MEM_ERRORif memory allocation failed
Z_STREAM_ERRORif the compression level is invalid
Z_VERSION_ERRORif the library version is incompatible with the version assumed by the caller.

See the Zlib manual for more detail.

◆ deflateInit2

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.

Parameters
[in]strmThe 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]levelThe compression level, from 0 (no compression) to 9 (best compression). Z_DEFAULT_COMPRESSION uses a compromise between speed and size.
[in]methodThis must be Z_DEFLATED.
[in]windowBitsBase 2 logarithm of the size of the compression history buffer, in the range 8-15.
[in]memLevelHow much memory should be allocated for internal compression state, from 1 (minimum) to 9 (maximum).
[in]strategyOne of Z_DEFAULT_STRATEGY; Z_FILTERED; Z_HUFFMAN_ONLY, or Z_RLE.
Return values
Z_OKon success
Z_MEM_ERRORif memory allocation failed
Z_STREAM_ERRORif the compression level is invalid
Z_VERSION_ERRORif the library version is incompatible with the version assumed by the caller.
Note
The Harlequin RIP and SDK do not use this call directly, but LibPNG may do.

See the Zlib manual for more detail.

◆ deflateParams

int( * sw_zlib_api_20200929::deflateParams) (z_streamp strm, int level, int strategy)

Change parameters on a compression stream.

Parameters
[in]strmThe stream to change parameters on.
[in]levelThe compression level, from 0 (no compression) to 9 (best compression). Z_DEFAULT_COMPRESSION uses a compromise between speed and size.
[in]strategyOne of Z_DEFAULT_STRATEGY; Z_FILTERED; Z_HUFFMAN_ONLY, or Z_RLE.
Return values
Z_OKon success
Z_STREAM_ERRORif the stream state was inconsistent
Note
The Harlequin RIP and SDK do not use this call directly. The TIFF library used for raster output in the "clrip" application layer may use this call.

See the Zlib manual for more detail.

◆ deflateReset

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.

Parameters
[in]strmThe stream to reset.
Return values
Z_OKon success
Z_STREAM_ERRORif the stream state was inconsistent
Note
The Harlequin core RIP does not use this call directly. The Harlequin SDK utility function gg_compress() uses this call, and the TIFF library used for raster output in the "clrip" application layer may also use this call.

See the Zlib manual for more detail.

◆ inflate

int( * sw_zlib_api_20200929::inflate) (z_streamp strm, int flush)

Decompress as much data as possible.

Parameters
[in]strmThe stream to decompress.
[in]flushOne of Z_NO_FLUSH, Z_SYNC_FLUSH, Z_BLOCK, Z_TREES or Z_FINISH.
Return values
Z_OKif progress was made
Z_STREAM_ENDif the end of the compressed data has been reached and all uncompressed output has been produced
Z_BUF_ERRORif no progress was possible
Z_MEM_ERRORif memory allocation failed
Z_STREAM_ERRORif the stream state was inconsistent

See the Zlib manual for more detail.

◆ inflateEnd

int( * sw_zlib_api_20200929::inflateEnd) (z_streamp strm)

Discard and destroy a decompression stream.

Parameters
[in]strmThe stream to destroy.
Return values
Z_OKon success
Z_STREAM_ERRORif the stream state was inconsistent

See the Zlib manual for more detail.

◆ inflateInit

int( * sw_zlib_api_20200929::inflateInit) (z_streamp strm)

Initializes a stream for decompression.

Parameters
[in]strmThe 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.
Return values
Z_OKon success
Z_MEM_ERRORif memory allocation failed
Z_VERSION_ERRORif the library version is incompatible with the version assumed by the caller.

See the Zlib manual for more detail.

◆ inflateInit2

int( * sw_zlib_api_20200929::inflateInit2) (z_streamp strm, int windowBits)

Initializes a stream for decompression with options.

Parameters
[in]strmThe 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]windowBitsBase 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.
Return values
Z_OKon success
Z_MEM_ERRORif memory allocation failed
Z_STREAM_ERRORif the parameters are invalid
Z_VERSION_ERRORif the library version is incompatible with the version assumed by the caller.
Note
The Harlequin RIP and SDK do not use this call directly, but LibPNG may do.

See the Zlib manual for more detail.

◆ inflateReset

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.

Parameters
[in]strmThe stream to reset.
Return values
Z_OKon success
Z_STREAM_ERRORif the stream state was inconsistent
Note
The Harlequin RIP and SDK do not use this call directly, but LibPNG may do. The TIFF library used for raster output in the "clrip" application layer may also use this call.

See the Zlib manual for more detail.

◆ inflateReset2

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.

Parameters
[in]strmThe stream to reset.
[in]windowBitsBase 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.
Return values
Z_OKon success
Z_STREAM_ERRORif the stream state was inconsistent or the windowBits parameter was invalid.
Note
The Harlequin RIP and SDK do not use this call directly, but LibPNG may do.

See the Zlib manual for more detail.

◆ inflateSync

int( * sw_zlib_api_20200929::inflateSync) (z_streamp strm)

Skips invalid compressed data until a possible point to resume decompression is reached.

Parameters
[in]strmThe stream to resynchronize.
Return values
Z_OKif a possible resumption point was found
Z_BUF_ERRORif no more input was provided
Z_DATA_ERRORif no resumption point was found
Z_STREAM_ERRORif stream structure was inconsistent
Note
The Harlequin RIP and SDK do not use this call directly. The TIFF library used for raster output in the "clrip" application layer may use this call.

See the Zlib manual for more detail.

◆ inflateValidate

int( * sw_zlib_api_20200929::inflateValidate) (z_streamp strm, int check)

Check if a stream structure is consistent.

Parameters
[in]strmThe stream to validate.
[in]checkA boolean indicating whether to set or unset the stream's validation mark.
Return values
Z_OKon success
Z_STREAM_ERRORif stream structure was inconsistent

The documentation for this struct was generated from the following file: