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_SecureUncompressAny</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_SecureUncompressAny <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>s32 MI_SecureUncompressAny( const void* srcp, u32 srcSize, void* destp, u32 dstSize );</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 <TR> 31 <TD width="13%"><EM><STRONG>srcSize</STRONG></EM></TD> 32 <TD width="87%">Source data size.</TD> 33 </TR> 34 <TR> 35 <TD width="13%"><EM><STRONG>destp</STRONG></EM></TD> 36 <TD width="87%">Destination address for decompression.</TD> 37 </TR> 38 <TR> 39 <TD width="13%"><EM><STRONG>dstSize</STRONG></EM></TD> 40 <TD width="87%">Destination size for decompression.</TD> 41 </TR> 42 </TBODY> 43</TABLE> 44 45<h2>Return Values</h2> 46<TABLE border="1" width="100%"> 47 <TBODY> 48 <TR> 49 <TD width="13%"><EM><STRONG>MI_ERR_SUCCESS</STRONG></EM></TD> 50 <TD width="87%">Function completed successfully.</TD> 51 </TR> 52 <TR> 53 <TD width="13%"><EM><STRONG>MI_ERR_UNSUPPORTED</STRONG></EM></TD> 54 <TD width="87%">Unsupported compression data type.</TD> 55 </TR> 56 <TR> 57 <TD width="13%"><EM><STRONG>MI_ERR_SRC_SHORTAGE</STRONG></EM></TD> 58 <TD width="87%">Source data size is too small.</TD> 59 </TR> 60 <TR> 61 <TD width="13%"><EM><STRONG>MI_ERR_SRC_REMAINDER</STRONG></EM></TD> 62 <TD width="87%">Source data size is too large.</TD> 63 </TR> 64 <TR> 65 <TD width="13%"><EM><STRONG>MI_ERR_DEST_OVERRUN</STRONG></EM></TD> 66 <TD width="87%">Overrun in the decompression buffer.</TD> 67 </TR> 68 <TR> 69 <TD width="13%"><EM><STRONG>MI_ERR_ILLEGAL_TABLE</STRONG></EM></TD> 70 <TD width="87%">The Huffman table contains mistakes.</TD> 71 </TR> 72 </TBODY> 73</TABLE> 74 75<H2>Description</H2> 76<P> 77Detects the compression format from the data header and executes the appropriate decompression process. 78</P> 79<P> 80The decompression processes for all of the compression types are linked in this function. Therefore, unless some special kind of compression is being used, it is perhaps more effective to execute the compression-type-specific function instead. 81</P> 82<P> 83By calling <A href="MI_GetUncompressedSize.html"><CODE>MI_GetUncompressedSize</CODE></A> as a reference when allocating the destination buffer size, you can get the post-compression data size, which is written in the header of the compressed data. Even if the header of the compressed data is corrupted and the correct value could not be obtained, it will detect and return any errors within the <CODE>MI_SecureUncompress*</CODE> functions. 84</P> 85<h2>See Also</h2> 86<p><CODE><A href="MI_GetUncompressedSize.html">MI_GetUncompressedSize</A>, <A href="MI_SecureUncompressRL.html">MI_SecureUncompressRL</A>, <A href="MI_SecureUncompressLZ.html">MI_SecureUncompressLZ</A>,<br> <A href="MI_SecureUncompressHuffman.html">MI_SecureUncompressHuffman</A>, <A href="MI_SecureUnfilterDiff.html">MI_SecureUnfilterDiff</A></CODE></p> 87 88<H2>Revision History</H2> 89<P>2008/05/22 Initial version.</P> 90<hr><p>CONFIDENTIAL</p></body> 91</html> 92