/usr/share/doc/liblzma-doc/html/lz__encoder_8c.html is in liblzma-doc 5.1.1alpha+20120614-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>XZ Utils: liblzma/lz/lz_encoder.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">XZ Utils
 <span id="projectnumber">5.1.0alpha</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_2e0898c272e1f0f93c8ef15f5da2a912.html">liblzma</a></li><li class="navelem"><a class="el" href="dir_50b86e5c919915733207984a4aa1052b.html">lz</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">lz_encoder.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>LZ in window.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include "<a class="el" href="lz__encoder_8h.html">lz_encoder.h</a>"</code><br/>
<code>#include "<a class="el" href="lz__encoder__hash_8h.html">lz_encoder_hash.h</a>"</code><br/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__coder__s.html">lzma_coder_s</a></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a0ffebd3acf94a8ae2aecd13872bf9ce6"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder_8c.html#a0ffebd3acf94a8ae2aecd13872bf9ce6">move_window</a> (<a class="el" href="structlzma__mf__s.html">lzma_mf</a> *mf)</td></tr>
<tr class="memdesc:a0ffebd3acf94a8ae2aecd13872bf9ce6"><td class="mdescLeft"> </td><td class="mdescRight">Moves the data in the input window to free space for new data. <a href="#a0ffebd3acf94a8ae2aecd13872bf9ce6"></a><br/></td></tr>
<tr class="memitem:af8e273502e2493eae8441a836715213e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder_8c.html#af8e273502e2493eae8441a836715213e">fill_window</a> (<a class="el" href="common_8h.html#a4fd16c96358c705abab5da65940aa1b1">lzma_coder</a> *coder, <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, <a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77e">lzma_action</a> action)</td></tr>
<tr class="memdesc:af8e273502e2493eae8441a836715213e"><td class="mdescLeft"> </td><td class="mdescRight">Tries to fill the input window (mf->buffer) <a href="#af8e273502e2493eae8441a836715213e"></a><br/></td></tr>
<tr class="memitem:a1f9b0d169bfa75d11bc1411f1d3ed5f1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f9b0d169bfa75d11bc1411f1d3ed5f1"></a>
static <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> </td><td class="memItemRight" valign="bottom"><b>lz_encode</b> (<a class="el" href="common_8h.html#a4fd16c96358c705abab5da65940aa1b1">lzma_coder</a> *coder, <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, <a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77e">lzma_action</a> action)</td></tr>
<tr class="memitem:afc36bb49c0c64f5cc324443d215e3773"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc36bb49c0c64f5cc324443d215e3773"></a>
static bool </td><td class="memItemRight" valign="bottom"><b>lz_encoder_prepare</b> (<a class="el" href="structlzma__mf__s.html">lzma_mf</a> *mf, <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const <a class="el" href="structlzma__lz__options.html">lzma_lz_options</a> *lz_options)</td></tr>
<tr class="memitem:aa4ec951d4aa73c3cf21f9dd2c153f311"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4ec951d4aa73c3cf21f9dd2c153f311"></a>
static bool </td><td class="memItemRight" valign="bottom"><b>lz_encoder_init</b> (<a class="el" href="structlzma__mf__s.html">lzma_mf</a> *mf, <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const <a class="el" href="structlzma__lz__options.html">lzma_lz_options</a> *lz_options)</td></tr>
<tr class="memitem:aa3748d94a78e951b0a2f3e38c21e8049"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa3748d94a78e951b0a2f3e38c21e8049"></a>
uint64_t </td><td class="memItemRight" valign="bottom"><b>lzma_lz_encoder_memusage</b> (const <a class="el" href="structlzma__lz__options.html">lzma_lz_options</a> *lz_options)</td></tr>
<tr class="memitem:a085df21818a985dceb67b56bc66bb4f8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a085df21818a985dceb67b56bc66bb4f8"></a>
static void </td><td class="memItemRight" valign="bottom"><b>lz_encoder_end</b> (<a class="el" href="common_8h.html#a4fd16c96358c705abab5da65940aa1b1">lzma_coder</a> *coder, <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator)</td></tr>
<tr class="memitem:adda9e2bd7a717305e5060b39de09b5c6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adda9e2bd7a717305e5060b39de09b5c6"></a>
static <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> </td><td class="memItemRight" valign="bottom"><b>lz_encoder_update</b> (<a class="el" href="common_8h.html#a4fd16c96358c705abab5da65940aa1b1">lzma_coder</a> *coder, <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filters_null lzma_attribute((__unused__)), const <a class="el" href="structlzma__filter.html">lzma_filter</a> *reversed_filters)</td></tr>
<tr class="memitem:ad974ad121f8a230f0a24714f15c113f3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad974ad121f8a230f0a24714f15c113f3"></a>
<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> </td><td class="memItemRight" valign="bottom"><b>lzma_lz_encoder_init</b> (<a class="el" href="structlzma__next__coder__s.html">lzma_next_coder</a> *next, <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const <a class="el" href="structlzma__filter__info__s.html">lzma_filter_info</a> *<a class="el" href="coder_8c.html#a9325236d5759d4eaadcba08a6bb5c96f">filters</a>, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>(*lz_init)(<a class="el" href="structlzma__lz__encoder.html">lzma_lz_encoder</a> *lz, <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const void *options, <a class="el" href="structlzma__lz__options.html">lzma_lz_options</a> *lz_options))</td></tr>
<tr class="memitem:a98a84efebf5e7ff1e8ddb821fc676d3f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder_8c.html#a98a84efebf5e7ff1e8ddb821fc676d3f">lzma_mf_is_supported</a> (<a class="el" href="lzma_2lzma_8h.html#acf740075f86fa61dc408d6d0dbf8fa80">lzma_match_finder</a> mf)</td></tr>
<tr class="memdesc:a98a84efebf5e7ff1e8ddb821fc676d3f"><td class="mdescLeft"> </td><td class="mdescRight">Test if given match finder is supported. <a href="#a98a84efebf5e7ff1e8ddb821fc676d3f"></a><br/></td></tr>
</table>
<a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>LZ in window. </p>
</div><h2>Function Documentation</h2>
<a class="anchor" id="a0ffebd3acf94a8ae2aecd13872bf9ce6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void move_window </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structlzma__mf__s.html">lzma_mf</a> * </td>
<td class="paramname"><em>mf</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Moves the data in the input window to free space for new data. </p>
<p>mf->buffer is a sliding input window, which keeps mf->keep_size_before bytes of input history available all the time. Now and then we need to "slide" the buffer to make space for the new data to the end of the buffer. At the same time, data older than keep_size_before is dropped. </p>
<p>References <a class="el" href="structlzma__mf__s.html#a432f5747c3af581ca57f59568546151e">lzma_mf_s::buffer</a>, <a class="el" href="structlzma__mf__s.html#af5818d3189473465de3942c48924b825">lzma_mf_s::keep_size_before</a>, <a class="el" href="structlzma__mf__s.html#a2f61158f799c0c4e77e6316038757fee">lzma_mf_s::offset</a>, <a class="el" href="structlzma__mf__s.html#aa3d4451f2e846e56b43fa8c1bc106575">lzma_mf_s::read_limit</a>, <a class="el" href="structlzma__mf__s.html#a2d75d309fc59e61e468fcd9e3a38c150">lzma_mf_s::read_pos</a>, and <a class="el" href="structlzma__mf__s.html#afcc4a74eb85f8942d40a21d9155d948c">lzma_mf_s::write_pos</a>.</p>
<p>Referenced by <a class="el" href="lz__encoder_8c.html#af8e273502e2493eae8441a836715213e">fill_window()</a>.</p>
</div>
</div>
<a class="anchor" id="af8e273502e2493eae8441a836715213e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> fill_window </td>
<td>(</td>
<td class="paramtype"><a class="el" href="common_8h.html#a4fd16c96358c705abab5da65940aa1b1">lzma_coder</a> * </td>
<td class="paramname"><em>coder</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structlzma__allocator.html">lzma_allocator</a> * </td>
<td class="paramname"><em>allocator</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t * </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t * </td>
<td class="paramname"><em>in_pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>in_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77e">lzma_action</a> </td>
<td class="paramname"><em>action</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Tries to fill the input window (mf->buffer) </p>
<p>If we are the last encoder in the chain, our input data is in in[]. Otherwise we call the next filter in the chain to process in[] and write its output to mf->buffer.</p>
<p>This function must not be called once it has returned LZMA_STREAM_END. </p>
<p>References <a class="el" href="structlzma__mf__s.html#a518ea4d19005bc70141b935a08809f89">lzma_mf_s::action</a>, <a class="el" href="structlzma__mf__s.html#a432f5747c3af581ca57f59568546151e">lzma_mf_s::buffer</a>, <a class="el" href="structlzma__next__coder__s.html#a0d736e310d786b85d83f151f26b85440">lzma_next_coder_s::code</a>, <a class="el" href="structlzma__next__coder__s.html#ac2064cebf4a0f2f9abb2e090348dae4a">lzma_next_coder_s::coder</a>, <a class="el" href="structlzma__mf__s.html#a876eae4eecf65b4676130823a8eabe9d">lzma_mf_s::keep_size_after</a>, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eac003781ccb81bbd5578e29abed8a8cfe">LZMA_OK</a>, <a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea868472b76492afcaef54020a481890b1">LZMA_RUN</a>, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea91ecc6fab14c13ad36224afbcb4e55c4">LZMA_STREAM_END</a>, <a class="el" href="structlzma__coder__s.html#abee9d87f9f7f48ac6dc7a92ec9d1b5f6">lzma_coder_s::mf</a>, <a class="el" href="lz__encoder_8c.html#a0ffebd3acf94a8ae2aecd13872bf9ce6">move_window()</a>, <a class="el" href="structlzma__coder__s.html#ae9544e7991d6e1590af64fe75204f3b1">lzma_coder_s::next</a>, <a class="el" href="structlzma__mf__s.html#af6719fc22695f6e8569969009ba5a727">lzma_mf_s::pending</a>, <a class="el" href="structlzma__mf__s.html#aa3d4451f2e846e56b43fa8c1bc106575">lzma_mf_s::read_limit</a>, <a class="el" href="structlzma__mf__s.html#a2d75d309fc59e61e468fcd9e3a38c150">lzma_mf_s::read_pos</a>, <a class="el" href="structlzma__mf__s.html#affdef5bbf8d8ad9aa2567772f6bd5740">lzma_mf_s::size</a>, <a class="el" href="structlzma__mf__s.html#a3ae339827dfef85a8bdfeafabbf2d73e">lzma_mf_s::skip</a>, and <a class="el" href="structlzma__mf__s.html#afcc4a74eb85f8942d40a21d9155d948c">lzma_mf_s::write_pos</a>.</p>
</div>
</div>
<a class="anchor" id="a98a84efebf5e7ff1e8ddb821fc676d3f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> lzma_mf_is_supported </td>
<td>(</td>
<td class="paramtype"><a class="el" href="lzma_2lzma_8h.html#acf740075f86fa61dc408d6d0dbf8fa80">lzma_match_finder</a> </td>
<td class="paramname"><em>match_finder</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Test if given match finder is supported. </p>
<p>Return true if the given match finder is supported by this liblzma build. Otherwise false is returned. It is safe to call this with a value that isn't listed in lzma_match_finder enumeration; the return value will be false.</p>
<p>There is no way to list which match finders are available in this particular liblzma version and build. It would be useless, because a new match finder, which the application developer wasn't aware, could require giving additional options to the encoder that the older match finders don't need. </p>
<p>References <a class="el" href="lzma_2lzma_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a7ab212446c3f6520f5c33ccfa4b3386a">LZMA_MF_BT2</a>, <a class="el" href="lzma_2lzma_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a983ecc59bf3e07a7c43fea551ea11865">LZMA_MF_BT3</a>, <a class="el" href="lzma_2lzma_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a468c32cdea9861d1ff98478364e6c547">LZMA_MF_BT4</a>, <a class="el" href="lzma_2lzma_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a6eb38f634021a192cada8a978b5de93b">LZMA_MF_HC3</a>, and <a class="el" href="lzma_2lzma_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a0944620f4949289c2ebde613cae12b04">LZMA_MF_HC4</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Nov 18 2012 19:30:21 for XZ Utils by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.2
</small></address>
</body>
</html>
|