SZFILE_GetUnpackedFile

Syntax

#include <cafe/szfile.h>

int SZFILE_GetUnpackedFile(SZFILE_ENTRY *apEntry, u8 * *apRetDataPtr,
                           u32 *apRetDataBytes);

Parameters

apEntry Pointer to manifest entry describing file to retrieve.
apRetDataPtr Pointer to pointer to receive address of uncompressed bytes. This pointer will be byte-aligned somewhere inside a decompressed stream. This alignment cannot be changed.
apRetDataBytes Number of bytes in the decompressed file pointed to by the apRetDataPtr output parameter.

Return Values

Returns zero for success or an error code to indicate failure.

Description

This function unpacks any stream associated with a file entry and returns a pointer to its data as well as the size of the unpacked file. A stream is never unpacked more than once but, if needed, this function will unpack a stream automatically (via SZFILE_UnpackStream).

Do Not Call From

Multiple threads This function is not thread-safe.

See Also

SZFILE helper library and demo
SZFILE_CreateArc
SZFILE_UnpackStream
SZFILE_FindInArc
SZFILE_Get
SZFILE_PurgeArc
LzmaCompress
LzmaUncompress

Revision History

2013/05/06 Initial version.


CONFIDENTIAL