CXCompressHuffman

C Specification

#include <revolution/cx.h>

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

Arguments

srcp The source address where the data to compress is stored.
size The data size of the source to compress.
dstp Needs a pointer to the compression destination buffer and a region greater than the source data size. Needs a 4-byte alignment.
huffBitSize The bit size (4 or 8) to Huffman encode.
work The work buffer used in Huffman compression. It requires the size of CX_HUFFMAN_COMPRESS_WORK_SIZE.
Needs a 4-byte alignment.

Return Values

Returns the size of the compressed data. If the data after compression is larger than the source file, no compression will be performed and a zero will be returned.

Description

This function performs Huffman compression and writes to a designated memory region. A region of the same size as the source data must be prepared in the compression destination buffer.

See Also

CXUncompressHuffman , CXReadUncompHuffman, CXCompressLZ, CXCompressRL

Revision History

07/06/2006 Initial version.


CONFIDENTIAL