1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
<html>
<head>
<title>Camstream: CamStream API documentation</title>
<link rel="stylesheet" href="../../tech.css" type="text/css">
</head>
<body>
<!-- Generated by Doxygen 1.2.6 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
<hr><h1>AdaptiveHuffman.h</h1><a href="adaptivehuffman_h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="preprocessor">#ifndef ADAPTIVEHUFFMAN_HPP</font>
00002 <font class="preprocessor"></font><font class="preprocessor">#define ADAPTIVEHUFFMAN_HPP</font>
00003 <font class="preprocessor"></font>
00004 <font class="keyword">struct </font><a class="code" href="struct_huffnode.html">HuffNode</a>;
00005 <font class="keyword">struct </font>HuffBlocks;
00006
00007 <font class="keyword">class </font><a class="code" href="class_cadaptivehuffman.html">CAdaptiveHuffman</a>
00008 {
00009 <font class="keyword">private</font>:
00010 <font class="comment">// Global stuff</font>
00011 <font class="keywordtype">int</font> MaxValue;
00012 <font class="keywordtype">int</font> LogValue;
00013 <font class="keywordtype">char</font> Compressor;
00014 <font class="keywordtype">char</font> UseMarks;
00015
00016 <font class="comment">// Stuff for Huffman tree</font>
00017 <a class="code" href="struct_huffnode.html">HuffNode</a> **Values;
00018 <a class="code" href="struct_huffnode.html">HuffNode</a> *Root, *Zero;
00019 <font class="keywordtype">int</font> Count;
00020 <a class="code" href="struct_huffnode.html">HuffNode</a> **Array;
00021
00022 <font class="comment">// Compressor stuff</font>
00023 <font class="keywordtype">char</font> *Buffer;
00024 <font class="keywordtype">int</font> BufferSize; <font class="comment">// buffer size in bits!</font>
00025 <font class="keywordtype">int</font> BitPos, MarkedBitPos; <font class="comment">// bit-position in buffer</font>
00026
00027 <font class="comment">// Decompressor state</font>
00028 <a class="code" href="struct_huffnode.html">HuffNode</a> *Walk;
00029 <font class="keyword">const</font> <font class="keywordtype">char</font> *BufP;
00030 <font class="keywordtype">char</font> BufC;
00031 <font class="keywordtype">int</font> State, BitShift;
00032
00033 <font class="keywordtype">void</font> Allocate();
00034 <font class="keywordtype">void</font> CleanUp();
00035
00036 <font class="keywordtype">bool</font> Stuff(<font class="keywordtype">int</font> code, <font class="keywordtype">int</font> length); <font class="comment">// Stuff bits in buffer</font>
00037
00038 <font class="keyword">public</font>:
00039 <font class="keyword">enum</font> {
00040 ValueOutOfBounds = -1,
00041 BufferFull = -2,
00042 EndOfFile = -3,
00043 };
00044
00045 <a class="code" href="class_cadaptivehuffman.html#a0">CAdaptiveHuffman</a>(<font class="keywordtype">int</font> max_value);
00046 <a class="code" href="class_cadaptivehuffman.html#a1">~CAdaptiveHuffman</a>();
00047
00048 <font class="keywordtype">void</font> <a class="code" href="class_cadaptivehuffman.html#a2">InitCompressor</a>(<font class="keywordtype">int</font> buffer_size, <font class="keywordtype">char</font> use_marks);
00049 <font class="keywordtype">int</font> <a class="code" href="class_cadaptivehuffman.html#a3">AddValue</a>(<font class="keywordtype">int</font> v);
00050 <font class="keywordtype">void</font> <a class="code" href="class_cadaptivehuffman.html#a4">Mark</a>();
00051 <font class="keywordtype">int</font> <a class="code" href="class_cadaptivehuffman.html#a5">GetBits</a>() <font class="keyword">const</font>;
00052 <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="class_cadaptivehuffman.html#a6">GetBuffer</a>() <font class="keyword">const</font>;
00053
00054 <font class="keywordtype">void</font> <a class="code" href="class_cadaptivehuffman.html#a7">InitDecompressor</a>(<font class="keywordtype">int</font> bits, <font class="keyword">const</font> <font class="keywordtype">char</font> *buffer);
00055 <font class="keywordtype">int</font> <a class="code" href="class_cadaptivehuffman.html#a8">GetValue</a>();
00056
00057 <font class="keywordtype">void</font> <a class="code" href="class_cadaptivehuffman.html#a9">PrintTree</a>();
00058 <font class="keywordtype">void</font> <a class="code" href="class_cadaptivehuffman.html#a10">PrintAncestors</a>();
00059 };
00060
00061 <font class="preprocessor">#endif</font>
</font></pre></div><hr><address><small>Generated at Sat May 18 02:56:55 2002 for Camstream by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.2.6 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
© 1997-2001</small></address>
</body>
</html>
|