nn::cx::CompressZlib Function

Syntax

#include <nn/cx.h>

s32 CompressZlib(
     void * pDst,
     size_t dstSize,
     const void * pSrc,
     size_t srcSize,
     void * pWork
);

Parameters

Name Description
out pDst Buffer where compressed data is written.
in dstSize Size of the buffer pointed to by pDst.
in pSrc Buffer storing the data to be compressed.
in srcSize Size of the data to be compressed.
in pWork Work buffer. It requires a region equal to ZLIB_COMPRESS_WORK_SIZE bytes.

Return Values

When compression succeeds, returns the data size after compression. Returns an ErrorCode value if unsuccessful.

Description

Performs deflate compression in zlib format.

You cannot get the size of the data before it is compressed with this function. If the data prior to compression is needed, maintain it separately.

Data compressed with this function can be decompressed with the UncompressZlib function.

Revision History

2012/05/17
Initial version.

CONFIDENTIAL