aboutsummaryrefslogtreecommitdiff
path: root/doc/api/vli_8h.html
blob: 0bb5a454b827cc2c88cc0268f35add1ebe99235a (plain) (blame)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>liblzma (XZ Utils): lzma/vli.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>


<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 id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="xz-logo.png"/></td>
  <td id="projectalign">
   <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.6.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;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&#160;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_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">vli.h File Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Variable-length integer handling.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a7b782528bd1934db7c020adbedb20ec9"><td class="memItemLeft" align="right" valign="top"><a id="a7b782528bd1934db7c020adbedb20ec9" name="a7b782528bd1934db7c020adbedb20ec9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VLI_MAX</b>&#160;&#160;&#160;(UINT64_MAX / 2)</td></tr>
<tr class="memdesc:a7b782528bd1934db7c020adbedb20ec9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum supported value of a variable-length integer. <br /></td></tr>
<tr class="separator:a7b782528bd1934db7c020adbedb20ec9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a4b28254a30c859018b896ed371d69a"><td class="memItemLeft" align="right" valign="top"><a id="a5a4b28254a30c859018b896ed371d69a" name="a5a4b28254a30c859018b896ed371d69a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VLI_UNKNOWN</b>&#160;&#160;&#160;UINT64_MAX</td></tr>
<tr class="memdesc:a5a4b28254a30c859018b896ed371d69a"><td class="mdescLeft">&#160;</td><td class="mdescRight">VLI value to denote that the value is unknown. <br /></td></tr>
<tr class="separator:a5a4b28254a30c859018b896ed371d69a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a063ecff4133aa2f8899b9fa3fdefd310"><td class="memItemLeft" align="right" valign="top"><a id="a063ecff4133aa2f8899b9fa3fdefd310" name="a063ecff4133aa2f8899b9fa3fdefd310"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VLI_BYTES_MAX</b>&#160;&#160;&#160;9</td></tr>
<tr class="memdesc:a063ecff4133aa2f8899b9fa3fdefd310"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum supported encoded length of variable length integers. <br /></td></tr>
<tr class="separator:a063ecff4133aa2f8899b9fa3fdefd310"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d8bf5322898bfa11945848420585881"><td class="memItemLeft" align="right" valign="top"><a id="a2d8bf5322898bfa11945848420585881" name="a2d8bf5322898bfa11945848420585881"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VLI_C</b>(n)&#160;&#160;&#160;UINT64_C(n)</td></tr>
<tr class="memdesc:a2d8bf5322898bfa11945848420585881"><td class="mdescLeft">&#160;</td><td class="mdescRight">VLI constant suffix. <br /></td></tr>
<tr class="separator:a2d8bf5322898bfa11945848420585881"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f67ed698215d865a2b87a95ab1320dd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vli_8h.html#a4f67ed698215d865a2b87a95ab1320dd">lzma_vli_is_valid</a>(vli)&#160;&#160;&#160;	((vli) &lt;= <a class="el" href="vli_8h.html#a7b782528bd1934db7c020adbedb20ec9">LZMA_VLI_MAX</a> || (vli) == <a class="el" href="vli_8h.html#a5a4b28254a30c859018b896ed371d69a">LZMA_VLI_UNKNOWN</a>)</td></tr>
<tr class="memdesc:a4f67ed698215d865a2b87a95ab1320dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Validate a variable-length integer.  <br /></td></tr>
<tr class="separator:a4f67ed698215d865a2b87a95ab1320dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a1dbc0ffc3e72748f64df8f7f71898272"><td class="memItemLeft" align="right" valign="top">typedef uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a></td></tr>
<tr class="memdesc:a1dbc0ffc3e72748f64df8f7f71898272"><td class="mdescLeft">&#160;</td><td class="mdescRight">Variable-length integer type.  <br /></td></tr>
<tr class="separator:a1dbc0ffc3e72748f64df8f7f71898272"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a50bbb77e9ec3b72c25586aa700c20970"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vli_8h.html#a50bbb77e9ec3b72c25586aa700c20970">lzma_vli_encode</a> (<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> vli, size_t *vli_pos, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow</td></tr>
<tr class="memdesc:a50bbb77e9ec3b72c25586aa700c20970"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode a variable-length integer.  <br /></td></tr>
<tr class="separator:a50bbb77e9ec3b72c25586aa700c20970"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b7d50e1074e0e2bcd81c29a5f7461c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vli_8h.html#a7b7d50e1074e0e2bcd81c29a5f7461c7">lzma_vli_decode</a> (<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> *vli, size_t *vli_pos, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow</td></tr>
<tr class="memdesc:a7b7d50e1074e0e2bcd81c29a5f7461c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode a variable-length integer.  <br /></td></tr>
<tr class="separator:a7b7d50e1074e0e2bcd81c29a5f7461c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d53e0b69934b43da8721fa6f1e8cc4f"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vli_8h.html#a8d53e0b69934b43da8721fa6f1e8cc4f">lzma_vli_size</a> (<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> vli) lzma_nothrow lzma_attr_pure</td></tr>
<tr class="memdesc:a8d53e0b69934b43da8721fa6f1e8cc4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of bytes required to encode a VLI.  <br /></td></tr>
<tr class="separator:a8d53e0b69934b43da8721fa6f1e8cc4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Variable-length integer handling. </p>
<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead.</dd></dl>
<p>In the .xz format, most integers are encoded in a variable-length representation, which is sometimes called little endian base-128 encoding. This saves space when smaller values are more likely than bigger values.</p>
<p>The encoding scheme encodes seven bits to every byte, using minimum number of bytes required to represent the given value. Encodings that use non-minimum number of bytes are invalid, thus every integer has exactly one encoded representation. The maximum number of bits in a VLI is 63, thus the vli argument must be less than or equal to UINT64_MAX / 2. You should use LZMA_VLI_MAX for clarity. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a4f67ed698215d865a2b87a95ab1320dd" name="a4f67ed698215d865a2b87a95ab1320dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f67ed698215d865a2b87a95ab1320dd">&#9670;&#160;</a></span>lzma_vli_is_valid</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define lzma_vli_is_valid</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">vli</td><td>)</td>
          <td>&#160;&#160;&#160;	((vli) &lt;= <a class="el" href="vli_8h.html#a7b782528bd1934db7c020adbedb20ec9">LZMA_VLI_MAX</a> || (vli) == <a class="el" href="vli_8h.html#a5a4b28254a30c859018b896ed371d69a">LZMA_VLI_UNKNOWN</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Validate a variable-length integer. </p>
<p>This is useful to test that application has given acceptable values for example in the uncompressed_size and compressed_size variables.</p>
<dl class="section return"><dt>Returns</dt><dd>True if the integer is representable as VLI or if it indicates unknown value. False if the integer cannot be represented as VLI. </dd></dl>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="a1dbc0ffc3e72748f64df8f7f71898272" name="a1dbc0ffc3e72748f64df8f7f71898272"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1dbc0ffc3e72748f64df8f7f71898272">&#9670;&#160;</a></span>lzma_vli</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef uint64_t <a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Variable-length integer type. </p>
<p>Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the underlying integer type.</p>
<p>lzma_vli will be uint64_t for the foreseeable future. If a bigger size is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will not overflow lzma_vli. This simplifies integer overflow detection. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a50bbb77e9ec3b72c25586aa700c20970" name="a50bbb77e9ec3b72c25586aa700c20970"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50bbb77e9ec3b72c25586aa700c20970">&#9670;&#160;</a></span>lzma_vli_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_vli_encode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
          <td class="paramname"><em>vli</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>vli_pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>out_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encode a variable-length integer. </p>
<p>This function has two modes: single-call and multi-call. Single-call mode encodes the whole integer at once; it is an error if the output buffer is too small. Multi-call mode saves the position in *vli_pos, and thus it is possible to continue encoding if the buffer becomes full before the whole integer has been encoded.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">vli</td><td>Integer to be encoded </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">vli_pos</td><td>How many VLI-encoded bytes have already been written out. When starting to encode a new integer in multi-call mode, *vli_pos must be set to zero. To use single-call encoding, set vli_pos to NULL. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>The next byte will be written to out[*out_pos]. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>Size of the out buffer; the first byte into which no data is written to is out[out_size].</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Slightly different return values are used in multi-call and single-call modes.</dd></dl>
<p>Single-call (vli_pos == NULL):</p><ul>
<li>LZMA_OK: Integer successfully encoded.</li>
<li>LZMA_PROG_ERROR: Arguments are not sane. This can be due to too little output space; single-call mode doesn't use LZMA_BUF_ERROR, since the application should have checked the encoded size with <a class="el" href="vli_8h.html#a8d53e0b69934b43da8721fa6f1e8cc4f" title="Get the number of bytes required to encode a VLI.">lzma_vli_size()</a>.</li>
</ul>
<p>Multi-call (vli_pos != NULL):</p><ul>
<li>LZMA_OK: So far all OK, but the integer is not completely written out yet.</li>
<li>LZMA_STREAM_END: Integer successfully encoded.</li>
<li>LZMA_BUF_ERROR: No output space was provided.</li>
<li>LZMA_PROG_ERROR: Arguments are not sane. </li>
</ul>

</div>
</div>
<a id="a7b7d50e1074e0e2bcd81c29a5f7461c7" name="a7b7d50e1074e0e2bcd81c29a5f7461c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b7d50e1074e0e2bcd81c29a5f7461c7">&#9670;&#160;</a></span>lzma_vli_decode()</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_vli_decode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> *&#160;</td>
          <td class="paramname"><em>vli</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>vli_pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>in_pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decode a variable-length integer. </p>
<p>Like <a class="el" href="vli_8h.html#a50bbb77e9ec3b72c25586aa700c20970" title="Encode a variable-length integer.">lzma_vli_encode()</a>, this function has single-call and multi-call modes.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">vli</td><td>Pointer to decoded integer. The decoder will initialize it to zero when *vli_pos == 0, so application isn't required to initialize *vli. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">vli_pos</td><td>How many bytes have already been decoded. When starting to decode a new integer in multi-call mode, *vli_pos must be initialized to zero. To use single-call decoding, set vli_pos to NULL. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">in_pos</td><td>The next byte will be read from in[*in_pos]. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer; the first byte that won't be read is in[in_size].</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Slightly different return values are used in multi-call and single-call modes.</dd></dl>
<p>Single-call (vli_pos == NULL):</p><ul>
<li>LZMA_OK: Integer successfully decoded.</li>
<li>LZMA_DATA_ERROR: Integer is corrupt. This includes hitting the end of the input buffer before the whole integer was decoded; providing no input at all will use LZMA_DATA_ERROR.</li>
<li>LZMA_PROG_ERROR: Arguments are not sane.</li>
</ul>
<p>Multi-call (vli_pos != NULL):</p><ul>
<li>LZMA_OK: So far all OK, but the integer is not completely decoded yet.</li>
<li>LZMA_STREAM_END: Integer successfully decoded.</li>
<li>LZMA_DATA_ERROR: Integer is corrupt.</li>
<li>LZMA_BUF_ERROR: No input was provided.</li>
<li>LZMA_PROG_ERROR: Arguments are not sane. </li>
</ul>

</div>
</div>
<a id="a8d53e0b69934b43da8721fa6f1e8cc4f" name="a8d53e0b69934b43da8721fa6f1e8cc4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d53e0b69934b43da8721fa6f1e8cc4f">&#9670;&#160;</a></span>lzma_vli_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t lzma_vli_size </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
          <td class="paramname"><em>vli</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of bytes required to encode a VLI. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vli</td><td>Integer whose encoded size is to be determined</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes on success (1-9). If vli isn't valid, zero is returned. </dd></dl>

</div>
</div>
</div><!-- contents -->
<hr class="footer"/>
<p style="text-align: right;padding-right: 12px;">
	XZ logo &copy; 2023 by Jia Tan is licensed under
	<a href="COPYING.CC-BY-SA-4.0"
	   rel="license"
	   style="display:inline-block;">
		CC BY-SA 4.0
	</a>
</p>
</body>
</html>