Harlequin RIP SDK
zlibutil.h File Reference

zlib utilities More...

#include "ripapiversn.h"
#include "zlibapi.h"
#include "std.h"

Functions

int32 gg_deflateInit (z_streamp strm, int32 level)
 Wrapper to zlib deflateInit() which sets strm to uses MemAlloc() / MemFree().
 
int32 gg_inflateInit (z_streamp strm)
 Wrapper to zlib inflateInit() which sets strm to uses MemAlloc() / MemFree().
 
int32 gg_deflate (z_streamp strm, uint8 *dest, uint32 *pDestLen, const uint8 *source, uint32 sourceLen)
 Wrapper to zlib deflate() which first resets strm. Expects dest to be big enough to hold compressed data, and returns Z_BUF_ERROR if it is not. More...
 
int32 gg_compress (uint8 *dest, uint32 *pDestLen, const uint8 *source, uint32 sourceLen)
 As zlib compress() but uses MemAlloc() / MemFree().
 
int32 gg_compress2 (uint8 *dest, uint32 *pDestLen, const uint8 *source, uint32 sourceLen, int32 level)
 As zlib compress2() but uses MemAlloc() / MemFree().
 
int32 gg_uncompress (uint8 *dest, uint32 *pDestLen, const uint8 *source, uint32 sourceLen)
 As zlib uncompress() but uses MemAlloc() / MemFree().
 
uint32 gg_compressBound (uint32 sourceLen)
 As zlib compressBound() but takes/returns uint32.
 

Detailed Description

zlib utilities

Function Documentation

◆ gg_deflate()

int32 gg_deflate ( z_streamp  strm,
uint8 dest,
uint32 pDestLen,
const uint8 source,
uint32  sourceLen 
)

Wrapper to zlib deflate() which first resets strm. Expects dest to be big enough to hold compressed data, and returns Z_BUF_ERROR if it is not.

Returns
Z_OK if successful, or one of the zlib errors.