1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>BitMagic: bm::encoder Class Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
<!-- Generated by Doxygen 1.4.1 -->
7
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="examples.html">Examples</a></div>
9
<a class="el" href="a00129.html">bm</a>::<a class="el" href="a00102.html">encoder</a></div>
10
<h1>bm::encoder Class Reference</h1>Memory encoding.
11
<a href="#_details">More...</a>
13
<code>#include <<a class="el" href="a00145.html">encoding.h</a>></code>
15
<table border="0" cellpadding="0" cellspacing="0">
17
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
18
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#a0">encoder</a> (unsigned char *buf, unsigned size)</td></tr>
20
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construction. <a href="#a0"></a><br></td></tr>
21
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#a1">put_8</a> (unsigned char c)</td></tr>
23
<tr><td class="mdescLeft"> </td><td class="mdescRight">Puts one character into the encoding buffer. <a href="#a1"></a><br></td></tr>
24
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#a2">put_16</a> (<a class="el" href="a00129.html#a28">bm::short_t</a> s)</td></tr>
26
<tr><td class="mdescLeft"> </td><td class="mdescRight">Puts short word (16 bits) into the encoding buffer. <a href="#a2"></a><br></td></tr>
27
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#a3">put_16</a> (const <a class="el" href="a00129.html#a28">bm::short_t</a> *s, unsigned count)</td></tr>
29
<tr><td class="mdescLeft"> </td><td class="mdescRight">Method puts array of short words (16 bits) into the encoding buffer. <a href="#a3"></a><br></td></tr>
30
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#a4">put_32</a> (<a class="el" href="a00129.html#a27">bm::word_t</a> w)</td></tr>
32
<tr><td class="mdescLeft"> </td><td class="mdescRight">Puts 32 bits word into encoding buffer. <a href="#a4"></a><br></td></tr>
33
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#a5">put_32</a> (const <a class="el" href="a00129.html#a27">bm::word_t</a> *w, unsigned count)</td></tr>
35
<tr><td class="mdescLeft"> </td><td class="mdescRight">Encodes array of 32-bit words. <a href="#a5"></a><br></td></tr>
36
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#a6">size</a> () const </td></tr>
38
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns size of the current encoding stream. <a href="#a6"></a><br></td></tr>
40
<hr><a name="_details"></a><h2>Detailed Description</h2>
43
Class for encoding data into memory. Properly handles aligment issues with integer data types.
47
Definition at line <a class="el" href="a00145.html#l00044">44</a> of file <a class="el" href="a00145.html">encoding.h</a>.<hr><h2>Constructor & Destructor Documentation</h2>
48
<a class="anchor" name="a0" doxytag="bm::encoder::encoder"></a><p>
49
<table class="mdTable" cellpadding="2" cellspacing="0">
52
<table cellpadding="0" cellspacing="0" border="0">
54
<td class="md" nowrap valign="top">bm::encoder::encoder </td>
55
<td class="md" valign="top">( </td>
56
<td class="md" nowrap valign="top">unsigned char * </td>
57
<td class="mdname" nowrap> <em>buf</em>, </td>
60
<td class="md" nowrap align="right"></td>
62
<td class="md" nowrap>unsigned </td>
63
<td class="mdname" nowrap> <em>size</em></td>
67
<td class="md">) </td>
68
<td class="md" colspan="2"><code> [inline]</code></td>
74
<table cellspacing="5" cellpadding="0" border="0">
84
<dl compact><dt><b>Parameters:</b></dt><dd>
85
<table border="0" cellspacing="2" cellpadding="0">
86
<tr><td valign="top"></td><td valign="top"><em>buf</em> </td><td>- memory buffer pointer. </td></tr>
87
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>- size of the buffer </td></tr>
92
Definition at line <a class="el" href="a00145.html#l00136">136</a> of file <a class="el" href="a00145.html">encoding.h</a>. </td>
95
<hr><h2>Member Function Documentation</h2>
96
<a class="anchor" name="a3" doxytag="bm::encoder::put_16"></a><p>
97
<table class="mdTable" cellpadding="2" cellspacing="0">
100
<table cellpadding="0" cellspacing="0" border="0">
102
<td class="md" nowrap valign="top">void bm::encoder::put_16 </td>
103
<td class="md" valign="top">( </td>
104
<td class="md" nowrap valign="top">const <a class="el" href="a00129.html#a28">bm::short_t</a> * </td>
105
<td class="mdname" nowrap> <em>s</em>, </td>
108
<td class="md" nowrap align="right"></td>
110
<td class="md" nowrap>unsigned </td>
111
<td class="mdname" nowrap> <em>count</em></td>
115
<td class="md">) </td>
116
<td class="md" colspan="2"><code> [inline]</code></td>
122
<table cellspacing="5" cellpadding="0" border="0">
130
Method puts array of short words (16 bits) into the encoding buffer.
134
Definition at line <a class="el" href="a00145.html#l00166">166</a> of file <a class="el" href="a00145.html">encoding.h</a>. </td>
137
<a class="anchor" name="a2" doxytag="bm::encoder::put_16"></a><p>
138
<table class="mdTable" cellpadding="2" cellspacing="0">
141
<table cellpadding="0" cellspacing="0" border="0">
143
<td class="md" nowrap valign="top">BMFORCEINLINE void bm::encoder::put_16 </td>
144
<td class="md" valign="top">( </td>
145
<td class="md" nowrap valign="top"><a class="el" href="a00129.html#a28">bm::short_t</a> </td>
146
<td class="mdname1" valign="top" nowrap> <em>s</em> </td>
147
<td class="md" valign="top"> ) </td>
148
<td class="md" nowrap></td>
154
<table cellspacing="5" cellpadding="0" border="0">
162
Puts short word (16 bits) into the encoding buffer.
164
<dl compact><dt><b>Parameters:</b></dt><dd>
165
<table border="0" cellspacing="2" cellpadding="0">
166
<tr><td valign="top"></td><td valign="top"><em>s</em> </td><td>- short word to encode </td></tr>
171
Definition at line <a class="el" href="a00145.html#l00156">156</a> of file <a class="el" href="a00145.html">encoding.h</a>.
173
References <a class="el" href="a00140.html#l00079">BMFORCEINLINE</a>. </td>
176
<a class="anchor" name="a5" doxytag="bm::encoder::put_32"></a><p>
177
<table class="mdTable" cellpadding="2" cellspacing="0">
180
<table cellpadding="0" cellspacing="0" border="0">
182
<td class="md" nowrap valign="top">void bm::encoder::put_32 </td>
183
<td class="md" valign="top">( </td>
184
<td class="md" nowrap valign="top">const <a class="el" href="a00129.html#a27">bm::word_t</a> * </td>
185
<td class="mdname" nowrap> <em>w</em>, </td>
188
<td class="md" nowrap align="right"></td>
190
<td class="md" nowrap>unsigned </td>
191
<td class="mdname" nowrap> <em>count</em></td>
195
<td class="md">) </td>
196
<td class="md" colspan="2"><code> [inline]</code></td>
202
<table cellspacing="5" cellpadding="0" border="0">
210
Encodes array of 32-bit words.
214
Definition at line <a class="el" href="a00145.html#l00211">211</a> of file <a class="el" href="a00145.html">encoding.h</a>. </td>
217
<a class="anchor" name="a4" doxytag="bm::encoder::put_32"></a><p>
218
<table class="mdTable" cellpadding="2" cellspacing="0">
221
<table cellpadding="0" cellspacing="0" border="0">
223
<td class="md" nowrap valign="top">BMFORCEINLINE void bm::encoder::put_32 </td>
224
<td class="md" valign="top">( </td>
225
<td class="md" nowrap valign="top"><a class="el" href="a00129.html#a27">bm::word_t</a> </td>
226
<td class="mdname1" valign="top" nowrap> <em>w</em> </td>
227
<td class="md" valign="top"> ) </td>
228
<td class="md" nowrap></td>
234
<table cellspacing="5" cellpadding="0" border="0">
242
Puts 32 bits word into encoding buffer.
244
<dl compact><dt><b>Parameters:</b></dt><dd>
245
<table border="0" cellspacing="2" cellpadding="0">
246
<tr><td valign="top"></td><td valign="top"><em>w</em> </td><td>- word to encode. </td></tr>
251
Definition at line <a class="el" href="a00145.html#l00199">199</a> of file <a class="el" href="a00145.html">encoding.h</a>.
253
References <a class="el" href="a00140.html#l00079">BMFORCEINLINE</a>. </td>
256
<a class="anchor" name="a1" doxytag="bm::encoder::put_8"></a><p>
257
<table class="mdTable" cellpadding="2" cellspacing="0">
260
<table cellpadding="0" cellspacing="0" border="0">
262
<td class="md" nowrap valign="top">BMFORCEINLINE void bm::encoder::put_8 </td>
263
<td class="md" valign="top">( </td>
264
<td class="md" nowrap valign="top">unsigned char </td>
265
<td class="mdname1" valign="top" nowrap> <em>c</em> </td>
266
<td class="md" valign="top"> ) </td>
267
<td class="md" nowrap></td>
273
<table cellspacing="5" cellpadding="0" border="0">
281
Puts one character into the encoding buffer.
283
<dl compact><dt><b>Parameters:</b></dt><dd>
284
<table border="0" cellspacing="2" cellpadding="0">
285
<tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>- character to encode </td></tr>
290
Definition at line <a class="el" href="a00145.html#l00146">146</a> of file <a class="el" href="a00145.html">encoding.h</a>.
292
References <a class="el" href="a00140.html#l00079">BMFORCEINLINE</a>. </td>
295
<a class="anchor" name="a6" doxytag="bm::encoder::size"></a><p>
296
<table class="mdTable" cellpadding="2" cellspacing="0">
299
<table cellpadding="0" cellspacing="0" border="0">
301
<td class="md" nowrap valign="top">unsigned bm::encoder::size </td>
302
<td class="md" valign="top">( </td>
303
<td class="mdname1" valign="top" nowrap> </td>
304
<td class="md" valign="top"> ) </td>
305
<td class="md" nowrap> const<code> [inline]</code></td>
311
<table cellspacing="5" cellpadding="0" border="0">
319
Returns size of the current encoding stream.
323
Definition at line <a class="el" href="a00145.html#l00189">189</a> of file <a class="el" href="a00145.html">encoding.h</a>. </td>
326
<hr>The documentation for this class was generated from the following file:<ul>
327
<li><a class="el" href="a00145.html">encoding.h</a></ul>
328
<hr size="1"><address style="align: right;"><small>Generated on Sun Aug 5 14:12:40 2007 for BitMagic by
329
<a href="http://www.doxygen.org/index.html">
330
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.1 </small></address>