MI_SecureUncompressLZ

# MI_SecureUncompressBLZ

## Syntax

  `#include <nitro/mi.h>`
  `s32 MI_SecureUncompressBLZ( const void *srcp, u32 srcSize, u32 dstSize );`

## Arguments

srcp | Source address where BLZ-compressed data is stored.
srcSize | Source data size.
dstSize | Destination size for decompression.

## Return Values

MI_ERR_SUCCESS | Function completed successfully.
MI_ERR_UNSUPPORTED | Unsupported compression data type.
MI_ERR_SRC_SHORTAGE | Source data size is too small.
MI_ERR_SRC_REMAINDER | Source data size is too large.
MI_ERR_DEST_OVERRUN | Overrun in the decompression buffer.

## Description

This function decompresses BLZ-compressed data and writes the data to a region in memory. The destination will be the address of the compressed data that was specified, which allows the memory consumption to be reduced. Specify the size of the data after decompression in dspSize. The source address must be aligned to a 4-byte boundary.

For the size of the data after decompression, you can either define the data size of the compressed source data in advance, or calculate the footer of the BLZ-compressed data using `FS_SeekFile()`. We have prepared a sample for the latter option.

The BLZ format is based on the LZ format. It is a compression format that supports reverse decompression. Can be created using the compBLZ tool.

## See Also

`compBLZ`

## Revision History

2008/06/20 Initial version.

CONFIDENTIAL