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<h2>Definitions</h2> 16 17<dl> 18 <dd> 19<PRE><CODE>#include <revolution/cx/CXStreamingUncompression.h></CODE><BR> 20typedef struct 21{ 22u8* destp; // 4B 23s32 destCount; // 4B 24u8* treep; // 4B 25u32 srcTmp; // 4B 26u32 destTmp; // 4B 27s16 treeSize; // 2B 28u8 srcTmpCnt; // 1B 29u8 destTmpCnt; // 1B 30u8 bitSize; // 1B 31u8 headerSize; // 1B 32u8 padding_[2]; // 2B 33u8 tree[0x200]; // 512B 34// Total 540B 35} CXUncompContextHuffman;</PRE> 36 </dd> 37</dl> 38<h2>Description</h2> 39<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 <A href="CXInitUncompContextHuffman.html">CXInitUncompContextHuffman</A> function and used by the <A href="CXReadUncompHuffman.html">CXReadUncompHuffman</A> function to save the uncompression state.<BR><BR> If the compressed data is 4-bit encoded data, there will be no problems if the 'tree' member array size is 32 bytes, so it is all right even if the provided region is 480 bytes smaller than sizeof( CXUncompContextHufffman ).<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> 40</P> 41<TABLE border="1" width="100%"> 42 <TBODY> 43 <TR> 44<TD width="13%"><EM><STRONG>destp</STRONG></EM></TD> 45<TD width="87%">Pointer to region where uncompressed data will be written</TD> 46 </TR> 47 <TR> 48<TD><EM><STRONG>destCount</STRONG></EM></TD> 49<TD>Remaining write size </TD> 50 </TR> 51 <TR> 52<TD><EM><STRONG>treep</STRONG></EM></TD> 53<TD>For storing Huffman encoding table, current pointer</TD> 54 </TR> 55 <TR> 56<TD><EM><STRONG>srcTmp</STRONG></EM></TD> 57<TD>For storing data while reading</TD> 58 </TR> 59 <TR> 60<TD><EM><STRONG>destTmp</STRONG></EM></TD> 61<TD>For storing data while writing</TD> 62 </TR> 63 <TR> 64<TD><EM><STRONG>treeSize</STRONG></EM></TD> 65<TD>For storing the size of the Huffman encoding table</TD> 66 </TR> 67 <TR> 68<TD><EM><STRONG>srcTmpCnt</STRONG></EM></TD> 69<TD>For storing data size while reading</TD> 70 </TR> 71 <TR> 72<TD><EM><STRONG>destTmpCnt</STRONG></EM></TD> 73<TD>For storing data size while writing</TD> 74 </TR> 75 <TR> 76<TD><EM><STRONG>bitSize</STRONG></EM></TD> 77<TD>Encoded bit size </TD> 78 </TR> 79 <TR> 80<TD><EM><STRONG>headerSize</STRONG></EM></TD> 81<TD>For storing the compressed header size while reading</TD> 82 </TR> 83 <TR> 84<TD width="13%"><EM><STRONG>tree</STRONG></EM></TD> 85<TD width="87%">Buffer for reading Huffman encoding table</TD> 86 </TR> 87 </TBODY> 88</TABLE> 89<h2>See Also</h2> 90<p><CODE><A href="CXInitUncompContextHuffman.html">CXInitUncompContextHuffman</A>, <A href="CXReadUncompHuffman.html">CXReadUncompHuffman</A>, <A href="CXUncompContextLZ.html">CXUncompContextLZ</A>,<A href="CXUncompContextRL.html">CXUncompContextRL</A><br></CODE></p> 91 92<H2>Revision History</H2> 93<P>07/06/2006 Initial version.</P> 94<hr> 95<P>CONFIDENTIAL</p> 96</BODY> 97</HTML> 98