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_SecureUncompressHuffman</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MI_SecureUncompressHuffman <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 &lt;nitro/mi.h&gt;</CODE><BR>
20  <BR>
21  <CODE>s32 MI_SecureUncompressHuffman( const void *srcp, u32 srcSize, void *destp, u32 dstSize );</CODE><BR>
22  </dd>
23</dl>
24<h2>Arguments</h2>
25<TABLE border="1" width="100%">
26  <TBODY>
27    <TR>
28      <TD width="13%"><EM><STRONG>srcp</STRONG></EM></TD>
29      <TD width="87%">Source address of Huffman compression data.</TD>
30    </TR>
31    <TR>
32      <TD width="13%"><EM><STRONG>srcSize</STRONG></EM></TD>
33      <TD width="87%">Source data size.</TD>
34    </TR>
35    <TR>
36      <TD width="13%"><EM><STRONG>destp</STRONG></EM></TD>
37      <TD width="87%">Destination address for decompression.</TD>
38    </TR>
39    <TR>
40      <TD width="13%"><EM><STRONG>dstSize</STRONG></EM></TD>
41      <TD width="87%">Destination size for decompression.</TD>
42    </TR>
43  </TBODY>
44</TABLE>
45
46<h2>Return Values</h2>
47<TABLE border="1" width="100%">
48  <TBODY>
49    <TR>
50      <TD width="13%"><EM><STRONG>MI_ERR_SUCCESS</STRONG></EM></TD>
51      <TD width="87%">Function completed successfully.</TD>
52    </TR>
53    <TR>
54      <TD width="13%"><EM><STRONG>MIRR_UNSUPPORTED</STRONG></EM></TD>
55      <TD width="87%">Unsupported compression data type.</TD>
56    </TR>
57    <TR>
58      <TD width="13%"><EM><STRONG>MI_ERR_SRC_SHORTAGE</STRONG></EM></TD>
59      <TD width="87%">Source data size is too small.</TD>
60    </TR>
61    <TR>
62      <TD width="13%"><EM><STRONG>MI_ERR_SRC_REMAINDER</STRONG></EM></TD>
63      <TD width="87%">Source data size is too large.</TD>
64    </TR>
65    <TR>
66      <TD width="13%"><EM><STRONG>MI_ERR_ILLEGAL_TABLE</STRONG></EM></TD>
67      <TD width="87%">The Huffman table contains mistakes.</TD>
68    </TR>
69  </TBODY>
70</TABLE>
71
72<H2>Description</H2>
73<P>Decompresses Huffman compression data and writes it in 32-bit units to the specified memory. The source address must be aligned to a 4-byte boundary.
74</P>
75<P>
76To perform streaming uncompression of data, use the <A href="MI_ReadUncompHuffman.html"><CODE>MI_ReadUncompHuffman</CODE></A> function.
77</P>
78<P>
79By 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>SecureUncompress*</CODE> functions.
80</P>
81
82<h2>See Also</h2>
83<p><CODE><A href="MI_GetUncompressedSize.html">MI_GetUncompressedSize</A>, <A href="MI_UncompressHuffman.html">MI_UncompressHuffman</A>, <A href="MI_InitUncompContextHuffman.html">MI_InitUncompContextHuffman</A>, <A href="MI_ReadUncompHuffman.html">MI_ReadUncompHuffman</A>, <!-- <A href="MI_IsFinishedUncompHuffman.html">MI_IsFinishedUncompHuffman</A>, --> <A href="MI_CompressHuffman.html">MI_CompressHuffman</A>, <A href="../../tools/ntrcomp.html">ntrcomp</A></CODE></p>
84
85<H2>Revision History</H2>
86<P>2008/05/22 Initial version.</P>
87<hr><p>CONFIDENTIAL</p></body>
88</html>
89