nn::cx::CompressHuffman Function

Syntax

#include <nn/cx.h>

u32 CompressHuffman(
     const u8 * srcp,
     u32 size,
     u8 * dstp,
     u8 huffBitSize,
     void * work
);

Parameters

Name Description
in srcp Pointer to compression source data.
in size Compression source data size.
out dstp Pointer to compression target data (requires a buffer larger than the compression source data).
in huffBitSize Number of encoded bits.
in work Temporary buffer to use for compression (requires a region of nn::cx::HUFFMAN_COMPRESS_WORK_SIZE bytes).

Return Values

Returns the size of the compressed data. If the compressed data is larger than the original data, compression is terminated and 0 is returned.

Description

Carries out Huffman compression.

Argument values must adhere to the following restrictions:

Revision History

2011/04/06
Added text about the restriction on argument values.
2010/11/10
Initial version.

CONFIDENTIAL