/usr/share/doc/liblzma-doc/html/easy__encoder_8c.html is in liblzma-doc 5.1.1alpha+20110809-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 | <!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"/>
<title>XZ Utils: liblzma/common/easy_encoder.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<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>
<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>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">liblzma/common/easy_encoder.c File Reference</div> </div>
</div>
<div class="contents">
<p>Easy .xz Stream encoder initialization.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include "<a class="el" href="easy__preset_8h.html">easy_preset.h</a>"</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><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="easy__encoder_8c.html#a0cb362a067eb6612c44a8e03d6c50855">lzma_easy_encoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *<a class="el" href="coder_8c.html#a048a6ae6a7da50de565b15d52ea9fafe">strm</a>, uint32_t preset, <a class="el" href="api_2lzma_2check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> <a class="el" href="coder_8c.html#a5c94b0defea7996f245faec2693056cb">check</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize .xz Stream encoder using a preset number. <a href="#a0cb362a067eb6612c44a8e03d6c50855"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Easy .xz Stream encoder initialization. </p>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a0cb362a067eb6612c44a8e03d6c50855"></a><!-- doxytag: member="easy_encoder.c::lzma_easy_encoder" ref="a0cb362a067eb6612c44a8e03d6c50855" args="(lzma_stream *strm, uint32_t preset, lzma_check check)" -->
<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_easy_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">uint32_t </td>
<td class="paramname"><em>preset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="api_2lzma_2check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> </td>
<td class="paramname"><em>check</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Initialize .xz Stream encoder using a preset number. </p>
<p>This function is intended for those who just want to use the basic features if liblzma (that is, most developers out there).</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
<tr><td class="paramname">preset</td><td>Compression preset to use. A preset consist of level number and zero or more flags. Usually flags aren't used, so preset is simply a number [0, 9] which match the options -0 ... -9 of the xz command line tool. Additional flags can be be set using bitwise-or with the preset level number, e.g. 6 | LZMA_PRESET_EXTREME. </td></tr>
<tr><td class="paramname">check</td><td>Integrity check type to use. See check.h for available checks. The xz command line tool defaults to LZMA_CHECK_CRC64, which is a good choice if you are unsure. LZMA_CHECK_CRC32 is good too as long as the uncompressed file is not many gigabytes.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>- LZMA_OK: Initialization succeeded. Use <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> to encode your data.<ul>
<li>LZMA_MEM_ERROR: Memory allocation failed.</li>
<li>LZMA_OPTIONS_ERROR: The given compression preset is not supported by this build of liblzma.</li>
<li>LZMA_UNSUPPORTED_CHECK: The given check type is not supported by this liblzma build.</li>
<li>LZMA_PROG_ERROR: One or more of the parameters have values that will never be valid. For example, strm == NULL.</li>
</ul>
</dd></dl>
<p>If initialization fails (return value is not LZMA_OK), all the memory allocated for *strm by liblzma is always freed. Thus, there is no need to call <a class="el" href="base_8h.html#a854ff37464ae1225febf14db1af43308" title="Free memory allocated for the coder data structures.">lzma_end()</a> after failed initialization.</p>
<p>If initialization succeeds, use <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> to do the actual encoding. Valid values for `action' (the second argument of <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>) are LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future, there may be compression levels or flags that don't support LZMA_SYNC_FLUSH. </p>
<p>References <a class="el" href="structlzma__options__easy.html#adb657fb0fb484aea2d4a5bc02d1edd00">lzma_options_easy::filters</a>, <a class="el" href="easy__preset_8c.html#a995811b30166c539268d4c30d1e60b74">lzma_easy_preset()</a>, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa9ff6dfee36b7aba4fae60706d37425f">LZMA_OPTIONS_ERROR</a>, and <a class="el" href="container_8h.html#a1a97aec94c9fedd7646cfa51c4f4cd52">lzma_stream_encoder()</a>.</p>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Tue Nov 1 2011 10:43:14 for XZ Utils by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
|