nn::cx::UncompressBLZ Function#include <nn/cx.h>
void UncompressBLZ(
void * pData,
size_t dataSize,
size_t bufferSize
);
| Name | Description | |
|---|---|---|
| in | pData | Pointer to the input or output data buffer |
| in | dataSize | Input file size (bytes) |
| in | bufferSize | Output buffer size (bytes) |
Decompresses LZ backward compressed (BLZ) data.
The expanded data overwrites the input buffer and is output. For this reason, the size of the input buffer must be allocated to be the same as the output size. The output size (in bytes) can be found using the following.
nn::fs::FileReader reader(PATH_TO_BLZ_ARCHIVE_FILE);
u32 inSize = reader.GetSize();
reader.Seek(-4, nn::fs::POSITION_BASE_END);
u32 outSize;
reader.Read(&outSize, 4);
outSize += inSize;
CONFIDENTIAL