CXReadUncompLZ

Syntax

#include <revolution/cx/CXStreamingUncompression.h>

s32 CXReadUncompLZ( CXUncompContextLZ *context, 
                     const void* data, 
                     u32 len );

Arguments

context Pointer to the context structure for the uncompression of LZ77-compressed data.
data Pointer to the next data in the file being decompressed.
len Size of the data provided in the second argument.

Return Values

Returns a positive value if data remains to be uncompressed, and a negative error code if an error has occurred.
returns 0 of all data was successfully decompressed.

Positive integer Number of bytes not yet decompressed.
CX_ERR_SUCCESS Ended normally (==0).
CX_ERR_UNSUPPORTED Unsupported compression data type.
CX_ERR_SRC_SHORTAGE Source data size is too small.
CX_ERR_SRC_REMAINDER Source data size is too large.
CX_ERR_ILLEGAL_TABLE The Huffman table contains mistakes.

Description

Performs streaming uncompression of LZ77-compressed or LZ77 extended-compressed data based on the data size provided, and copies it to the buffer specified by the CXInitUncompContextLZ function.
Compared to CXUncompressLZ, which decompresses all data at once, this function is slow.

See Also

CXGetUncompressedSize
CXUncompressLZ
CXSecureUncompressLZ
CXInitUncompContextLZ
CXIsFinishedUncompLZ
CXCompressLZ
CXCompressLZEx
ntcompress

Revision History

2009/09/25 Explained data compressed in the LZ77 extended-compression format.
2007/09/03 Corrected error in See Also, adding a link for CXCompressLZEx.
2006/07/06 Initial version.


CONFIDENTIAL