/usr/share/doc/liblzma-doc/html/filter__encoder_8c.html is in liblzma-doc 5.2.2-1.3.
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 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | <!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"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>XZ Utils: liblzma/common/filter_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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">XZ Utils
 <span id="projectnumber">5.2.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></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_db777975f8e21a5de5f283e04473bf67.html">common</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> |
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">filter_encoder.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Filter ID mapping to filter-specific functions.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include "filter_encoder.h"</code><br />
<code>#include "filter_common.h"</code><br />
<code>#include "<a class="el" href="lzma__encoder_8h.html">lzma_encoder.h</a>"</code><br />
<code>#include "<a class="el" href="lzma2__encoder_8h.html">lzma2_encoder.h</a>"</code><br />
<code>#include "simple_encoder.h"</code><br />
<code>#include "<a class="el" href="delta__encoder_8h.html">delta_encoder.h</a>"</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><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__filter__encoder.html">lzma_filter_encoder</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad5dc226c8305a5fd6b0e0f80ab72b35a"><td class="memItemLeft" align="right" valign="top"><a id="ad5dc226c8305a5fd6b0e0f80ab72b35a"></a>
static const <a class="el" href="structlzma__filter__encoder.html">lzma_filter_encoder</a> * </td><td class="memItemRight" valign="bottom"><b>encoder_find</b> (<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> <a class="el" href="filter__common_8c.html#a3ee597b96b2ff619e515fac79a1ba1c5">id</a>)</td></tr>
<tr class="separator:ad5dc226c8305a5fd6b0e0f80ab72b35a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1600cc95c59adc4ff5fa196652142a31"><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="filter__encoder_8c.html#a1600cc95c59adc4ff5fa196652142a31">lzma_filter_encoder_is_supported</a> (<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> <a class="el" href="filter__common_8c.html#a3ee597b96b2ff619e515fac79a1ba1c5">id</a>)</td></tr>
<tr class="memdesc:a1600cc95c59adc4ff5fa196652142a31"><td class="mdescLeft"> </td><td class="mdescRight">Test if the given Filter ID is supported for encoding. <a href="#a1600cc95c59adc4ff5fa196652142a31">More...</a><br /></td></tr>
<tr class="separator:a1600cc95c59adc4ff5fa196652142a31"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adcde5a9917d1ca033f6c1cc35c9be4fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="filter__encoder_8c.html#adcde5a9917d1ca033f6c1cc35c9be4fc">lzma_filters_update</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *<a class="el" href="coder_8c.html#a048a6ae6a7da50de565b15d52ea9fafe">strm</a>, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *<a class="el" href="coder_8c.html#a9325236d5759d4eaadcba08a6bb5c96f">filters</a>)</td></tr>
<tr class="memdesc:adcde5a9917d1ca033f6c1cc35c9be4fc"><td class="mdescLeft"> </td><td class="mdescRight">Update the filter chain in the encoder. <a href="#adcde5a9917d1ca033f6c1cc35c9be4fc">More...</a><br /></td></tr>
<tr class="separator:adcde5a9917d1ca033f6c1cc35c9be4fc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af71b9ac685ec70bb2b905993499d2b80"><td class="memItemLeft" align="right" valign="top"><a id="af71b9ac685ec70bb2b905993499d2b80"></a>
<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> </td><td class="memItemRight" valign="bottom"><b>lzma_raw_encoder_init</b> (<a class="el" href="structlzma__next__coder__s.html">lzma_next_coder</a> *next, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *options)</td></tr>
<tr class="separator:af71b9ac685ec70bb2b905993499d2b80"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aed21808fcea4df30f742c5369627f731"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="filter__encoder_8c.html#aed21808fcea4df30f742c5369627f731">lzma_raw_encoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *<a class="el" href="coder_8c.html#a048a6ae6a7da50de565b15d52ea9fafe">strm</a>, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *options)</td></tr>
<tr class="memdesc:aed21808fcea4df30f742c5369627f731"><td class="mdescLeft"> </td><td class="mdescRight">Initialize raw encoder. <a href="#aed21808fcea4df30f742c5369627f731">More...</a><br /></td></tr>
<tr class="separator:aed21808fcea4df30f742c5369627f731"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6c882f0353d7fe74157b51f0776093ae"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="filter__encoder_8c.html#a6c882f0353d7fe74157b51f0776093ae">lzma_raw_encoder_memusage</a> (const <a class="el" href="structlzma__filter.html">lzma_filter</a> *<a class="el" href="coder_8c.html#a9325236d5759d4eaadcba08a6bb5c96f">filters</a>)</td></tr>
<tr class="memdesc:a6c882f0353d7fe74157b51f0776093ae"><td class="mdescLeft"> </td><td class="mdescRight">Calculate approximate memory requirements for raw encoder. <a href="#a6c882f0353d7fe74157b51f0776093ae">More...</a><br /></td></tr>
<tr class="separator:a6c882f0353d7fe74157b51f0776093ae"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaedc859d12a6fc09ea6d041faa48d7c1"><td class="memItemLeft" align="right" valign="top"><a id="aaedc859d12a6fc09ea6d041faa48d7c1"></a>
uint64_t </td><td class="memItemRight" valign="bottom"><b>lzma_mt_block_size</b> (const <a class="el" href="structlzma__filter.html">lzma_filter</a> *<a class="el" href="coder_8c.html#a9325236d5759d4eaadcba08a6bb5c96f">filters</a>)</td></tr>
<tr class="separator:aaedc859d12a6fc09ea6d041faa48d7c1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7ea8fcfdb19312ff323a78fb6d5ce908"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="filter__encoder_8c.html#a7ea8fcfdb19312ff323a78fb6d5ce908">lzma_properties_size</a> (uint32_t *size, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filter)</td></tr>
<tr class="memdesc:a7ea8fcfdb19312ff323a78fb6d5ce908"><td class="mdescLeft"> </td><td class="mdescRight">Get the size of the Filter Properties field. <a href="#a7ea8fcfdb19312ff323a78fb6d5ce908">More...</a><br /></td></tr>
<tr class="separator:a7ea8fcfdb19312ff323a78fb6d5ce908"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a311b1198ed1c047fefc31071adb5600b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="filter__encoder_8c.html#a311b1198ed1c047fefc31071adb5600b">lzma_properties_encode</a> (const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filter, uint8_t *props)</td></tr>
<tr class="memdesc:a311b1198ed1c047fefc31071adb5600b"><td class="mdescLeft"> </td><td class="mdescRight">Encode the Filter Properties field. <a href="#a311b1198ed1c047fefc31071adb5600b">More...</a><br /></td></tr>
<tr class="separator:a311b1198ed1c047fefc31071adb5600b"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a0a6f06ddf54c46fdee728b762e606636"><td class="memItemLeft" align="right" valign="top"><a id="a0a6f06ddf54c46fdee728b762e606636"></a>
static const <a class="el" href="structlzma__filter__encoder.html">lzma_filter_encoder</a> </td><td class="memItemRight" valign="bottom"><b>encoders</b> []</td></tr>
<tr class="separator:a0a6f06ddf54c46fdee728b762e606636"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Filter ID mapping to filter-specific functions. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a1600cc95c59adc4ff5fa196652142a31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1600cc95c59adc4ff5fa196652142a31">◆ </a></span>lzma_filter_encoder_is_supported()</h2>
<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_filter_encoder_is_supported </td>
<td>(</td>
<td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> </td>
<td class="paramname"><em>id</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Test if the given Filter ID is supported for encoding. </p>
<p>Return true if the give Filter ID is supported for encoding by this liblzma build. Otherwise false is returned.</p>
<p>There is no way to list which filters are available in this particular liblzma version and build. It would be useless, because the application couldn't know what kind of options the filter would need. </p>
</div>
</div>
<a id="adcde5a9917d1ca033f6c1cc35c9be4fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcde5a9917d1ca033f6c1cc35c9be4fc">◆ </a></span>lzma_filters_update()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_filters_update </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> * </td>
<td class="paramname"><em>strm</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> * </td>
<td class="paramname"><em>filters</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Update the filter chain in the encoder. </p>
<p>This function is for advanced users only. This function has two slightly different purposes:</p>
<ul>
<li>After LZMA_FULL_FLUSH when using Stream encoder: Set a new filter chain, which will be used starting from the next Block.</li>
<li>After LZMA_SYNC_FLUSH using Raw, Block, or Stream encoder: Change the filter-specific options in the middle of encoding. The actual filters in the chain (Filter IDs) cannot be changed. In the future, it might become possible to change the filter options without using LZMA_SYNC_FLUSH.</li>
</ul>
<p>While rarely useful, this function may be called also when no data has been compressed yet. In that case, this function will behave as if LZMA_FULL_FLUSH (Stream encoder) or LZMA_SYNC_FLUSH (Raw or Block encoder) had been used right before calling this function.</p>
<dl class="section return"><dt>Returns</dt><dd>- LZMA_OK<ul>
<li>LZMA_MEM_ERROR</li>
<li>LZMA_MEMLIMIT_ERROR</li>
<li>LZMA_OPTIONS_ERROR</li>
<li>LZMA_PROG_ERROR </li>
</ul>
</dd></dl>
<p class="reference">References <a class="el" href="coder_8c.html#a9325236d5759d4eaadcba08a6bb5c96f">filters</a>, <a class="el" href="structlzma__stream.html#a209da54c2fb5dea40ad011c8408300d0">lzma_stream::internal</a>, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea2dac8d451cb38da8550653d0d7be4ec2">LZMA_PROG_ERROR</a>, <a class="el" href="filter__encoder_8c.html#a6c882f0353d7fe74157b51f0776093ae">lzma_raw_encoder_memusage()</a>, <a class="el" href="structlzma__internal__s.html#a5bdb142bf9982fbbc7f5c29156ccab43">lzma_internal_s::next</a>, <a class="el" href="coder_8c.html#a048a6ae6a7da50de565b15d52ea9fafe">strm</a>, and <a class="el" href="structlzma__next__coder__s.html#a5874e5acb550ef5d189f2cc653060c7f">lzma_next_coder_s::update</a>.</p>
</div>
</div>
<a id="aed21808fcea4df30f742c5369627f731"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed21808fcea4df30f742c5369627f731">◆ </a></span>lzma_raw_encoder()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_raw_encoder </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> * </td>
<td class="paramname"><em>strm</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> * </td>
<td class="paramname"><em>filters</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize raw encoder. </p>
<p>This function may be useful when implementing custom file formats.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">strm</td><td>Pointer to properly prepared <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma. ">lzma_stream</a> </td></tr>
<tr><td class="paramname">filters</td><td>Array of <a class="el" href="structlzma__filter.html" title="Filter options. ">lzma_filter</a> structures. The end of the array must be marked with .id = LZMA_VLI_UNKNOWN.</td></tr>
</table>
</dd>
</dl>
<p>The `action' with <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data. ">lzma_code()</a> can be LZMA_RUN, LZMA_SYNC_FLUSH (if the filter chain supports it), or LZMA_FINISH.</p>
<dl class="section return"><dt>Returns</dt><dd>- LZMA_OK<ul>
<li>LZMA_MEM_ERROR</li>
<li>LZMA_OPTIONS_ERROR</li>
<li>LZMA_PROG_ERROR </li>
</ul>
</dd></dl>
<p class="reference">References <a class="el" href="common_8h.html#a844da62faaaf4c19a9a297129bc30a8c">lzma_next_strm_init</a>.</p>
</div>
</div>
<a id="a6c882f0353d7fe74157b51f0776093ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c882f0353d7fe74157b51f0776093ae">◆ </a></span>lzma_raw_encoder_memusage()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint64_t lzma_raw_encoder_memusage </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> * </td>
<td class="paramname"><em>filters</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate approximate memory requirements for raw encoder. </p>
<p>This function can be used to calculate the memory requirements for Block and Stream encoders too because Block and Stream encoders don't need significantly more memory than raw encoder.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes of memory required for the given filter chain when encoding. If an error occurs, for example due to unsupported filter chain, UINT64_MAX is returned. </dd></dl>
<p class="reference">Referenced by <a class="el" href="filter__encoder_8c.html#adcde5a9917d1ca033f6c1cc35c9be4fc">lzma_filters_update()</a>.</p>
</div>
</div>
<a id="a7ea8fcfdb19312ff323a78fb6d5ce908"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ea8fcfdb19312ff323a78fb6d5ce908">◆ </a></span>lzma_properties_size()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_properties_size </td>
<td>(</td>
<td class="paramtype">uint32_t * </td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> * </td>
<td class="paramname"><em>filter</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the size of the Filter Properties field. </p>
<p>This function may be useful when implementing custom file formats using the raw encoder and decoder.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">size</td><td>Pointer to uint32_t to hold the size of the properties </td></tr>
<tr><td class="paramname">filter</td><td>Filter ID and options (the size of the properties may vary depending on the options)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>- LZMA_OK<ul>
<li>LZMA_OPTIONS_ERROR</li>
<li>LZMA_PROG_ERROR</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This function validates the Filter ID, but does not necessarily validate the options. Thus, it is possible that this returns LZMA_OK while the following call to <a class="el" href="filter_8h.html#a8e00887086df5a44084ac22e48415de3" title="Encode the Filter Properties field. ">lzma_properties_encode()</a> returns LZMA_OPTIONS_ERROR. </dd></dl>
<p class="reference">Referenced by <a class="el" href="filter__flags__encoder_8c.html#a7015967aa324750a66c788b1987aa6a5">lzma_filter_flags_encode()</a>, and <a class="el" href="filter__flags__encoder_8c.html#a23a84602614b62ba2c9241149fd89087">lzma_filter_flags_size()</a>.</p>
</div>
</div>
<a id="a311b1198ed1c047fefc31071adb5600b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a311b1198ed1c047fefc31071adb5600b">◆ </a></span>lzma_properties_encode()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_properties_encode </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> * </td>
<td class="paramname"><em>filter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t * </td>
<td class="paramname"><em>props</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Encode the Filter Properties field. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filter</td><td>Filter ID and options </td></tr>
<tr><td class="paramname">props</td><td>Buffer to hold the encoded options. The size of buffer must have been already determined with <a class="el" href="filter_8h.html#aee038818cf7bbe044c3f7a7c86998c1b" title="Get the size of the Filter Properties field. ">lzma_properties_size()</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>- LZMA_OK<ul>
<li>LZMA_OPTIONS_ERROR</li>
<li>LZMA_PROG_ERROR</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Even this function won't validate more options than actually necessary. Thus, it is possible that encoding the properties succeeds but using the same options to initialize the encoder will fail.</dd>
<dd>
If <a class="el" href="filter_8h.html#aee038818cf7bbe044c3f7a7c86998c1b" title="Get the size of the Filter Properties field. ">lzma_properties_size()</a> indicated that the size of the Filter Properties field is zero, calling <a class="el" href="filter_8h.html#a8e00887086df5a44084ac22e48415de3" title="Encode the Filter Properties field. ">lzma_properties_encode()</a> is not required, but it won't do any harm either. </dd></dl>
<p class="reference">Referenced by <a class="el" href="filter__flags__encoder_8c.html#a7015967aa324750a66c788b1987aa6a5">lzma_filter_flags_encode()</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
|