/usr/share/doc/liblzma-doc/html/lz__encoder__mf_8c.html is in liblzma-doc 5.2.2-1.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 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 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | <!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.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>XZ Utils: liblzma/lz/lz_encoder_mf.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.12 -->
<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_50b86e5c919915733207984a4aa1052b.html">lz</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">lz_encoder_mf.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Match finders.
<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 />
<code>#include "<a class="el" href="memcmplen_8h.html">memcmplen.h</a>"</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aa84dd0b4f5690a4f890f7be99792feeb"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder__mf_8c.html#aa84dd0b4f5690a4f890f7be99792feeb">EMPTY_HASH_VALUE</a>   0</td></tr>
<tr class="separator:aa84dd0b4f5690a4f890f7be99792feeb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a73a2d7ca0b7c574a5043d0236fec29c8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder__mf_8c.html#a73a2d7ca0b7c574a5043d0236fec29c8">MUST_NORMALIZE_POS</a>   UINT32_MAX</td></tr>
<tr class="separator:a73a2d7ca0b7c574a5043d0236fec29c8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aafda9f47948ddd2342f44150a3489908"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder__mf_8c.html#aafda9f47948ddd2342f44150a3489908">header</a>(is_bt, len_min, ret_op)</td></tr>
<tr class="separator:aafda9f47948ddd2342f44150a3489908"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8b1ccc141b3c8be0a63b15fec7f9c8b2"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder__mf_8c.html#a8b1ccc141b3c8be0a63b15fec7f9c8b2">header_find</a>(is_bt, len_min)</td></tr>
<tr class="separator:a8b1ccc141b3c8be0a63b15fec7f9c8b2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acbaeadaaa3485eaebf078fb5ed712a36"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder__mf_8c.html#acbaeadaaa3485eaebf078fb5ed712a36">header_skip</a>(is_bt, len_min)   <a class="el" href="lz__encoder__mf_8c.html#aafda9f47948ddd2342f44150a3489908">header</a>(is_bt, len_min, continue)</td></tr>
<tr class="separator:acbaeadaaa3485eaebf078fb5ed712a36"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0e7fce36bf4da7e7bd9651901d22eddb"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder__mf_8c.html#a0e7fce36bf4da7e7bd9651901d22eddb">call_find</a>(func, len_best)</td></tr>
<tr class="separator:a0e7fce36bf4da7e7bd9651901d22eddb"><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:a47b5a3f51e46b7ba5908fbf7150d3343"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder__mf_8c.html#a47b5a3f51e46b7ba5908fbf7150d3343">lzma_mf_find</a> (<a class="el" href="structlzma__mf__s.html">lzma_mf</a> *mf, uint32_t *count_ptr, <a class="el" href="structlzma__match.html">lzma_match</a> *matches)</td></tr>
<tr class="memdesc:a47b5a3f51e46b7ba5908fbf7150d3343"><td class="mdescLeft"> </td><td class="mdescRight">Find matches starting from the current byte. <a href="#a47b5a3f51e46b7ba5908fbf7150d3343">More...</a><br /></td></tr>
<tr class="separator:a47b5a3f51e46b7ba5908fbf7150d3343"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a648138094aea5aa00a259061633ab848"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder__mf_8c.html#a648138094aea5aa00a259061633ab848">normalize</a> (<a class="el" href="structlzma__mf__s.html">lzma_mf</a> *mf)</td></tr>
<tr class="memdesc:a648138094aea5aa00a259061633ab848"><td class="mdescLeft"> </td><td class="mdescRight">Normalizes hash values. <a href="#a648138094aea5aa00a259061633ab848">More...</a><br /></td></tr>
<tr class="separator:a648138094aea5aa00a259061633ab848"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a664d6298d1e02fb4817f416382953f20"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder__mf_8c.html#a664d6298d1e02fb4817f416382953f20">move_pos</a> (<a class="el" href="structlzma__mf__s.html">lzma_mf</a> *mf)</td></tr>
<tr class="memdesc:a664d6298d1e02fb4817f416382953f20"><td class="mdescLeft"> </td><td class="mdescRight">Mark the current byte as processed from point of view of the match finder. <a href="#a664d6298d1e02fb4817f416382953f20">More...</a><br /></td></tr>
<tr class="separator:a664d6298d1e02fb4817f416382953f20"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a38834174a29ae811fbd2ee848f069866"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="lz__encoder__mf_8c.html#a38834174a29ae811fbd2ee848f069866">move_pending</a> (<a class="el" href="structlzma__mf__s.html">lzma_mf</a> *mf)</td></tr>
<tr class="separator:a38834174a29ae811fbd2ee848f069866"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Match finders. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="aa84dd0b4f5690a4f890f7be99792feeb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa84dd0b4f5690a4f890f7be99792feeb">§ </a></span>EMPTY_HASH_VALUE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define EMPTY_HASH_VALUE   0</td>
</tr>
</table>
</div><div class="memdoc">
<p>Hash value to indicate unused element in the hash. Since we start the positions from dict_size + 1, zero is always too far to qualify as usable match position. </p>
</div>
</div>
<a id="a73a2d7ca0b7c574a5043d0236fec29c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a73a2d7ca0b7c574a5043d0236fec29c8">§ </a></span>MUST_NORMALIZE_POS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MUST_NORMALIZE_POS   UINT32_MAX</td>
</tr>
</table>
</div><div class="memdoc">
<p>Normalization must be done when <a class="el" href="structlzma__mf__s.html#a2f61158f799c0c4e77e6316038757fee">lzma_mf.offset</a> + <a class="el" href="structlzma__mf__s.html#a2d75d309fc59e61e468fcd9e3a38c150">lzma_mf.read_pos</a> reaches MUST_NORMALIZE_POS. </p>
</div>
</div>
<a id="aafda9f47948ddd2342f44150a3489908"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafda9f47948ddd2342f44150a3489908">§ </a></span>header</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define header</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">is_bt, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">len_min, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">ret_op </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">uint32_t len_limit = <a class="code" href="lz__encoder_8h.html#a448bea3aca15ae451c69e197bb6720f9">mf_avail</a>(mf); \</div><div class="line"> if (mf->nice_len <= len_limit) { \</div><div class="line"> len_limit = mf->nice_len; \</div><div class="line"> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (len_limit < (len_min) \</div><div class="line"> || (is_bt && mf->action == <a class="code" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea14d75152afcda85d215e877fdd9c4170">LZMA_SYNC_FLUSH</a>)) { \</div><div class="line"> assert(mf->action != <a class="code" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea868472b76492afcaef54020a481890b1">LZMA_RUN</a>); \</div><div class="line"> move_pending(mf); \</div><div class="line"> ret_op; \</div><div class="line"> } \</div><div class="line"> const uint8_t *cur = <a class="code" href="lz__encoder_8h.html#a6e013d2ce6aa381e26fb6579cbd9ddae">mf_ptr</a>(mf); \</div><div class="line"> const uint32_t pos = mf->read_pos + mf->offset</div><div class="ttc" id="lz__encoder_8h_html_a448bea3aca15ae451c69e197bb6720f9"><div class="ttname"><a href="lz__encoder_8h.html#a448bea3aca15ae451c69e197bb6720f9">mf_avail</a></div><div class="ttdeci">static uint32_t mf_avail(const lzma_mf *mf)</div><div class="ttdoc">Get the number of bytes that haven&#39;t been ran through the match finder yet. </div><div class="ttdef"><b>Definition:</b> lz_encoder.h:230</div></div>
<div class="ttc" id="lz__encoder_8h_html_a6e013d2ce6aa381e26fb6579cbd9ddae"><div class="ttname"><a href="lz__encoder_8h.html#a6e013d2ce6aa381e26fb6579cbd9ddae">mf_ptr</a></div><div class="ttdeci">static const uint8_t * mf_ptr(const lzma_mf *mf)</div><div class="ttdoc">Get pointer to the first byte not ran through the match finder. </div><div class="ttdef"><b>Definition:</b> lz_encoder.h:222</div></div>
<div class="ttc" id="base_8h_html_aa92efcbf3cecfcac79c81fc645fce77ea14d75152afcda85d215e877fdd9c4170"><div class="ttname"><a href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea14d75152afcda85d215e877fdd9c4170">LZMA_SYNC_FLUSH</a></div><div class="ttdoc">Make all the input available at output. </div><div class="ttdef"><b>Definition:</b> base.h:265</div></div>
<div class="ttc" id="base_8h_html_aa92efcbf3cecfcac79c81fc645fce77ea868472b76492afcaef54020a481890b1"><div class="ttname"><a href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea868472b76492afcaef54020a481890b1">LZMA_RUN</a></div><div class="ttdoc">Continue coding. </div><div class="ttdef"><b>Definition:</b> base.h:251</div></div>
</div><!-- fragment --><p>Calculate len_limit and determine if there is enough input to run the actual match finder code. Sets up "cur" and "pos". This macro is used by all find functions and binary tree skip functions. Hash chain skip function doesn't need len_limit so a simpler code is used in them. </p>
</div>
</div>
<a id="a8b1ccc141b3c8be0a63b15fec7f9c8b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b1ccc141b3c8be0a63b15fec7f9c8b2">§ </a></span>header_find</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define header_find</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">is_bt, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">len_min </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><a class="code" href="lz__encoder__mf_8c.html#aafda9f47948ddd2342f44150a3489908">header</a>(is_bt, len_min, <span class="keywordflow">return</span> 0); \</div><div class="line"> uint32_t matches_count = 0</div><div class="ttc" id="lz__encoder__mf_8c_html_aafda9f47948ddd2342f44150a3489908"><div class="ttname"><a href="lz__encoder__mf_8c.html#aafda9f47948ddd2342f44150a3489908">header</a></div><div class="ttdeci">#define header(is_bt, len_min, ret_op)</div><div class="ttdef"><b>Definition:</b> lz_encoder_mf.c:191</div></div>
</div><!-- fragment --><p>Header for find functions. "return 0" indicates that zero matches were found. </p>
</div>
</div>
<a id="acbaeadaaa3485eaebf078fb5ed712a36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbaeadaaa3485eaebf078fb5ed712a36">§ </a></span>header_skip</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define header_skip</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">is_bt, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">len_min </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>   <a class="el" href="lz__encoder__mf_8c.html#aafda9f47948ddd2342f44150a3489908">header</a>(is_bt, len_min, continue)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Header for a loop in a skip function. "continue" tells to skip the rest of the code in the loop. </p>
</div>
</div>
<a id="a0e7fce36bf4da7e7bd9651901d22eddb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e7fce36bf4da7e7bd9651901d22eddb">§ </a></span>call_find</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define call_find</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">func, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">len_best </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">do</span> { \</div><div class="line"> matches_count = func(len_limit, pos, cur, cur_match, mf->depth, \</div><div class="line"> mf->son, mf->cyclic_pos, mf->cyclic_size, \</div><div class="line"> matches + matches_count, len_best) \</div><div class="line"> - matches; \</div><div class="line"> move_pos(mf); \</div><div class="line"> return matches_count; \</div><div class="line">} <span class="keywordflow">while</span> (0)</div></div><!-- fragment --><p>Calls hc_find_func() or bt_find_func() and calculates the total number of matches found. Updates the dictionary position and returns the number of matches found. </p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a47b5a3f51e46b7ba5908fbf7150d3343"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47b5a3f51e46b7ba5908fbf7150d3343">§ </a></span>lzma_mf_find()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t lzma_mf_find </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>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t * </td>
<td class="paramname"><em>count_ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structlzma__match.html">lzma_match</a> * </td>
<td class="paramname"><em>matches</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Find matches starting from the current byte. </p>
<dl class="section return"><dt>Returns</dt><dd>The length of the longest match found </dd></dl>
<p>References <a class="el" href="structlzma__mf__s.html#a930fffc0a68d7e5305c1197c08275697">lzma_mf_s::find</a>.</p>
</div>
</div>
<a id="a648138094aea5aa00a259061633ab848"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a648138094aea5aa00a259061633ab848">§ </a></span>normalize()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void normalize </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>Normalizes hash values. </p>
<p>The hash arrays store positions of match candidates. The positions are relative to an arbitrary offset that is not the same as the absolute offset in the input stream. The relative position of the current byte is <a class="el" href="structlzma__mf__s.html#a2f61158f799c0c4e77e6316038757fee">lzma_mf.offset</a> + <a class="el" href="structlzma__mf__s.html#a2d75d309fc59e61e468fcd9e3a38c150">lzma_mf.read_pos</a>. The distances of the matches are the differences of the current read position and the position found from the hash.</p>
<p>To prevent integer overflows of the offsets stored in the hash arrays, we need to "normalize" the stored values now and then. During the normalization, we drop values that indicate distance greater than the dictionary size, thus making space for new values. </p>
</div>
</div>
<a id="a664d6298d1e02fb4817f416382953f20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a664d6298d1e02fb4817f416382953f20">§ </a></span>move_pos()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void move_pos </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>Mark the current byte as processed from point of view of the match finder. </p>
<p>References <a class="el" href="structlzma__mf__s.html#a2d75d309fc59e61e468fcd9e3a38c150">lzma_mf_s::read_pos</a>.</p>
</div>
</div>
<a id="a38834174a29ae811fbd2ee848f069866"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38834174a29ae811fbd2ee848f069866">§ </a></span>move_pending()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void move_pending </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>When flushing, we cannot run the match finder unless there is nice_len bytes available in the dictionary. Instead, we skip running the match finder (indicating that no match was found), and count how many bytes we have ignored this way.</p>
<p>When new data is given after the flushing was completed, the match finder is restarted by rewinding mf->read_pos backwards by mf->pending. Then the missed bytes are added to the hash using the match finder's skip function (with small amount of input, it may start using mf->pending again if flushing).</p>
<p>Due to this rewinding, we don't touch cyclic_pos or test for normalization. It will be done when the match finder's skip function catches up after a flush. </p>
<p>References <a class="el" href="structlzma__mf__s.html#a2d75d309fc59e61e468fcd9e3a38c150">lzma_mf_s::read_pos</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.12
</small></address>
</body>
</html>
|