MI_GetCompressionType

Syntax

#include <nitro/mi.h>

MICompressionType MI_GetCompressionType( const void* srcp );

Arguments

srcp Source address where the compressed data is stored.

Return Values

The compression format.

Description

This function gets the compression format by checking the data header information of the compressed data. This function does not check the contents of the compressed data but only reads the compression format included in the beginning of the data.

This function is compatible with all compression formats supported by the TWL-SDK.

The return values have the following definitions in the MICompressType enumerated type.

MI_COMPRESSION_LZ Data compressed using the LZ77 format.
MI_COMPRESSION_HUFFMAN Data compressed using the Huffman format.
MI_COMPRESSION_RL Data compressed using the Run Length format.
MI_COMPRESSION_DIFF Data compressed with the difference filter applied.

Internal Operation

Determines the compression type by reading the first four bytes of the data header.

See Also

MI_UncompressLZ*, MI_UncompressHuffman, MI_UncompressRL*, MI_UnfilterDiff*, MI_GetUncompressedSize

Revision History

2004/06/18 Initial version.


CONFIDENTIAL