1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MI_GetCompressionType</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_GetCompressionType <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/mi.h></CODE><BR> 20 <BR> 21 <CODE>MICompressionType MI_GetCompressionType( const void* srcp );</CODE></dd> 22</dl> 23<h2>Arguments</h2> 24<TABLE border="1" width="100%"> 25 <TBODY> 26 <TR> 27 <TD width="13%"><EM><STRONG>srcp</STRONG></EM></TD> 28 <TD width="87%">Source address where the compressed data is stored.</TD> 29 </TR> 30 </TBODY> 31</TABLE> 32 33<h2>Return Values</h2> 34<p>The compression format.</p> 35 36<H2>Description</H2> 37<P>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.</P> 38<P>This function is compatible with all compression formats supported by the TWL-SDK.</P> 39<P>The return values have the following definitions in the <code>MICompressType</code> enumerated type.</P> 40<TABLE border="1"> 41 <TBODY> 42 <TR> 43 <TD><CODE>MI_COMPRESSION_LZ</CODE></TD> 44 <TD>Data compressed using the LZ77 format.</TD> 45 </TR> 46 <TR> 47 <TD><CODE>MI_COMPRESSION_HUFFMAN</CODE></TD> 48 <TD>Data compressed using the Huffman format.</TD> 49 </TR> 50 <TR> 51 <TD><CODE>MI_COMPRESSION_RL</CODE></TD> 52 <TD>Data compressed using the Run Length format.</TD> 53 </TR> 54 <TR> 55 <TD><CODE>MI_COMPRESSION_DIFF</CODE></TD> 56 <TD>Data compressed with the difference filter applied.</TD> 57 </TR> 58 </TBODY> 59</TABLE> 60<h2>Internal Operation</h2> 61<P>Determines the compression type by reading the first four bytes of the data header.</P> 62 63<h2>See Also</h2> 64<p><CODE><A href="MI_UncompressLZ.html">MI_UncompressLZ*</A>, <A href="MI_UncompressHuffman.html">MI_UncompressHuffman</A>, <A href="MI_UncompressRL.html">MI_UncompressRL*</A>, <A href="MI_UnfilterDiff.html">MI_UnfilterDiff*</A>, <A href="MI_GetUncompressedSize.html">MI_GetUncompressedSize</A></CODE></p> 65 66<H2>Revision History</H2> 67<P>2004/06/18 Initial version.</P> 68<hr><p>CONFIDENTIAL</p></body> 69</html> 70