1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3<head> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<title>MIUncompContextHuffman</title> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</head> 10<body> 11<h1 align="left">MIUncompContextHuffman <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1> 12<h2>Definition</h2> 13<dl> 14 <dd> 15 <PRE><CODE>#include <nitro/mi/uncomp_stream.h></CODE><BR> 16typedef struct 17{ 18 u8* destp; // 4B 19 s32 destCount; // 4B 20 u8* treep; // 4B 21 u32 srcTmp; // 4B 22 u32 destTmp; // 4B 23 s16 treeSize; // 2B 24 u8 srcTmpCnt; // 1B 25 u8 destTmpCnt; // 1B 26 u8 bitSize; // 1B 27 u8 _padding2[3]; // 3B 28 u8 tree[0x200]; // 512B 29 // Total 540B 30} MIUncompContextHuffman;</PRE> 31 </dd> 32</dl> 33<h2>Description</h2> 34<P>This is the context structure for saving the state of data uncompression when Huffman-compressed data is being read from the Card and undergoing streaming uncompression. The context is initialized by the <CODE><A href="MI_InitUncompContextHuffman.html">MI_InitUncompContextHuffman</A></CODE> function and used by the <CODE><A href="MI_ReadUncompHuffman.html">MI_ReadUncompHuffman</A></CODE> function to save the uncompressed state.<BR><BR> If the compressed data is 4-bit encoded data, there will not be any problems if the tree member's array size is 32 bytes, so it is OK to provide a region that is 480 bytes smaller than <nobr><code>sizeof( MIUncompContextHufffman )</code></nobr>.<BR> If the compressed data is 8-bit encoded data you need 512 bytes, so you cannot trim the size of the structure.<BR> <BR> 35</P> 36<TABLE border="1" width="100%"> 37 <TBODY> 38 <TR> 39 <TD width="13%"><EM><STRONG>destp</STRONG></EM></TD> 40 <TD width="87%">Pointer to region where uncompressed data will be written</TD> 41 </TR> 42 <TR> 43 <TD><EM><STRONG>destCount</STRONG></EM></TD> 44 <TD>Remaining write size </TD> 45 </TR> 46 <TR> 47 <TD><EM><STRONG>treep</STRONG></EM></TD> 48 <TD>For storing Huffman encoding table, current pointer</TD> 49 </TR> 50 <TR> 51 <TD><EM><STRONG>srcTmp</STRONG></EM></TD> 52 <TD>For storing data while reading</TD> 53 </TR> 54 <TR> 55 <TD><EM><STRONG>destTmp</STRONG></EM></TD> 56 <TD>For storing data while writing</TD> 57 </TR> 58 <TR> 59 <TD><EM><STRONG>treeSize</STRONG></EM></TD> 60 <TD>For storing the size of the Huffman encoding table</TD> 61 </TR> 62 <TR> 63 <TD><EM><STRONG>srcTmpCnt</STRONG></EM></TD> 64 <TD>For storing data size while reading</TD> 65 </TR> 66 <TR> 67 <TD><EM><STRONG>destTmpCnt</STRONG></EM></TD> 68 <TD>For storing data size while writing</TD> 69 </TR> 70 <TR> 71 <TD><EM><STRONG>bitSize</STRONG></EM></TD> 72 <TD>Encoded bit size </TD> 73 </TR> 74 <TR> 75 <TD width="13%"><EM><STRONG>tree</STRONG></EM></TD> 76 <TD width="87%">Buffer for reading Huffman encoding table</TD> 77 </TR> 78 </TBODY> 79</TABLE> 80<h2>See Also</h2> 81<p><code><a href="MI_InitUncompContextHuffman.html">MI_InitUncompContextHuffman</a></code><BR> <code><a href="MI_ReadUncompHuffman.html">MI_ReadUncompHuffman</a></code><BR> <code><a href="MIUncompContextLZ.html">MIUncompContextLZ</a></code><BR> <code><a href="MIUncompContextRL.html">MIUncompContextRL</a></code></p> 82<H2>Revision History</H2> 83<P>2004/11/30 Initial version.</P> 84<hr><p>CONFIDENTIAL</p></body> 85</html> 86