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 8.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>CXUncompContextHuffman</title> 9<LINK rel="stylesheet" href="../CSS/revolution.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">CXUncompContextHuffman</h1> 15 16<h2>Definitions</h2> 17<DL><DD><PRE class="construction"> 18#include <revolution/cx/CXStreamingUncompression.h> 19 20typedef struct 21{ 22 u8* destp; // 4B 23 s32 destCount; // 4B 24 s32 forceDestCount; // 4B 25 u8* treep; // 4B 26 u32 srcTmp; // 4B 27 u32 destTmp; // 4B 28 s16 treeSize; // 2B 29 u8 srcTmpCnt; // 1B 30 u8 destTmpCnt; // 1B 31 u8 bitSize; // 1B 32 u8 headerSize; // 1B 33 u8 padding_[2]; // 2B 34 u8 tree[0x200]; // 512B 35 // Total 544B 36} CXUncompContextHuffman; 37</PRE></dd></dl> 38 39<h2>Description</h2> 40<P>This is the context structure for saving the state of data uncompression when Huffman-compressed data is being read from the card and is undergoing streaming uncompression. The context is initialized by the <A href="CXInitUncompContextHuffman.html"><CODE>CXInitUncompContextHuffman</CODE></A> function and used by the <A href="CXReadUncompHuffman.html"><CODE>CXReadUncompHuffman</CODE></A> function to save the uncompression state.<BR><BR> If the compressed data uses a 4-bit encoding, the <SPAN class="argument">tree</SPAN> member variable can use an array size of 32 bytes. You may therefore give a region that is 480 bytes smaller than <CODE>sizeof( CXUncompContextHuffman )</CODE>.<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> 41</P> 42<TABLE class="arguments" border="1"> 43 <TBODY> 44 <TR> 45<TH>destp</TH> 46<TD>Pointer to destination region where uncompressed data will be written.</TD> 47 </TR> 48 <TR> 49<TH>destCount</TH> 50<TD>Remaining write size.</TD> 51 </TR> 52 <TR> 53<TH>forceDestCount</TH> 54<TD>Uncompression destination size that is forcibly set.</TD> 55 </TR> 56 <TR> 57<TH>treep</TH> 58<TD>For storing Huffman encoding table, current pointer.</TD> 59 </TR> 60 <TR> 61<TH>srcTmp</TH> 62<TD>For storing data while it is being loaded.</TD> 63 </TR> 64 <TR> 65<TH>destTmp</TH> 66<TD>For storing data while it is being written.</TD> 67 </TR> 68 <TR> 69<TH>treeSize</TH> 70<TD>For storing the size of the Huffman encoding table.</TD> 71 </TR> 72 <TR> 73<TH>srcTmpCnt</TH> 74<TD>For storing the size of the data currently being loaded.</TD> 75 </TR> 76 <TR> 77<TH>destTmpCnt</TH> 78<TD>For storing the size of the data currently being written.</TD> 79 </TR> 80 <TR> 81<TH>bitSize</TH> 82<TD>Encoding bit size.</TD> 83 </TR> 84 <TR> 85<TH>headerSize</TH> 86<TD>For storing the compressed header size while reading.</TD> 87 </TR> 88 <TR> 89<TH>tree</TH> 90<TD>Buffer for loading Huffman encoding table.</TD> 91 </TR> 92 </TBODY> 93</TABLE> 94 95<h2>See Also</h2> 96<P class="reference"> 97<A href="CXInitUncompContextHuffman.html">CXInitUncompContextHuffman</A>, 98<A href="CXReadUncompHuffman.html">CXReadUncompHuffman</A>, 99<A href="CXUncompContextLZ.html">CXUncompContextLZ</A>, 100<A href="CXUncompContextRL.html">CXUncompContextRL</A> 101</P> 102 103<H2>Revision History</H2> 104<P> 1052006/09/03 Reflected changes to the structure definition.<BR>2006/07/06 Initial version.<BR> 106</P> 107 108<hr><p>CONFIDENTIAL</p></body> 109</html> 110