mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-05 03:24:17 +01:00
1747 lines
312 KiB
HTML
1747 lines
312 KiB
HTML
<!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">
|
|
<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.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>wut: /home/ash/Code/wut2/include/zlib.h Source File</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="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.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">wut
|
|
 <span id="projectnumber">1.0.0-beta9</span>
|
|
</div>
|
|
<div id="projectbrief">Wii U Toolchain</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">zlib.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="zlib_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* zlib.h -- interface of the 'zlib' general purpose compression library</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> version 1.2.5, April 19th, 2010</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> This software is provided 'as-is', without any express or implied</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> warranty. In no event will the authors be held liable for any damages</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> arising from the use of this software.</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> Permission is granted to anyone to use this software for any purpose,</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> including commercial applications, and to alter it and redistribute it</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> freely, subject to the following restrictions:</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> 1. The origin of this software must not be misrepresented; you must not</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> claim that you wrote the original software. If you use this software</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> in a product, an acknowledgment in the product documentation would be</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> appreciated but is not required.</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> 2. Altered source versions must be plainly marked as such, and must not be</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> misrepresented as being the original software.</span></div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> 3. This notice may not be removed or altered from any source distribution.</span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> Jean-loup Gailly Mark Adler</span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> jloup@gzip.org madler@alumni.caltech.edu</span></div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> The data format used by the zlib library is described by RFCs (Request for</span></div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt</span></div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).</span></div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  </div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#ifndef ZLIB_H</span></div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#define ZLIB_H</span></div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  </div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "<a class="code" href="zconf_8h.html">zconf.h</a>"</span></div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  </div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  </div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="zlib_8h.html#a51dc9dc65e483b3222c1f0f6a87eb76e"> 40</a></span> <span class="preprocessor">#define ZLIB_VERSION "1.2.5"</span></div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="zlib_8h.html#a6413cdfb4cdc0b5a09cf9b5f3f8f48ef"> 41</a></span> <span class="preprocessor">#define ZLIB_VERNUM 0x1250</span></div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="zlib_8h.html#a52eec052f38e306d472e75bfafda9608"> 42</a></span> <span class="preprocessor">#define ZLIB_VER_MAJOR 1</span></div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="zlib_8h.html#a82109105b5511ffa8f8373b6a917e1e4"> 43</a></span> <span class="preprocessor">#define ZLIB_VER_MINOR 2</span></div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="zlib_8h.html#ad3662b8749a50045ec1c120354fb7e9d"> 44</a></span> <span class="preprocessor">#define ZLIB_VER_REVISION 5</span></div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="zlib_8h.html#a788ea49a5b65e12b11d7f274542d5af5"> 45</a></span> <span class="preprocessor">#define ZLIB_VER_SUBREVISION 0</span></div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  </div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment"> The 'zlib' compression library provides in-memory compression and</span></div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment"> decompression functions, including integrity checks of the uncompressed data.</span></div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment"> This version of the library supports only one compression method (deflation)</span></div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment"> but other algorithms will be added later and will have the same stream</span></div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment"> interface.</span></div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment"> Compression can be done in a single step if the buffers are large enough,</span></div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment"> or can be done by repeated calls of the compression function. In the latter</span></div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="comment"> case, the application must provide more input and/or consume the output</span></div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="comment"> (providing more output space) before each call.</span></div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="comment"> The compressed data format used by default by the in-memory functions is</span></div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="comment"> the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped</span></div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="comment"> around a deflate stream, which is itself documented in RFC 1951.</span></div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="comment"> The library also supports reading and writing files in gzip (.gz) format</span></div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment"> with an interface similar to that of stdio using the functions that start</span></div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment"> with "gz". The gzip format is different from the zlib format. gzip is a</span></div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="comment"> gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.</span></div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment"> This library can optionally read and write gzip streams in memory as well.</span></div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment"> The zlib format was designed to be compact and fast for use in memory</span></div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment"> and on communications channels. The gzip format was designed for single-</span></div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment"> file compression on file systems, has a larger header than zlib to maintain</span></div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment"> directory information, and uses a different, slower check method than zlib.</span></div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"> The library does not install any signal handler. The decoder checks</span></div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment"> the consistency of the compressed data, so the library should never crash</span></div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment"> even in case of corrupted input.</span></div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  </div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e"> 80</a></span> <span class="keyword">typedef</span> <a class="code" href="zconf_8h.html#a2de3690ae41712f1488ce8b89b07141a">voidpf</a> (*alloc_func) <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#a2de3690ae41712f1488ce8b89b07141a">voidpf</a> opaque, <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> items, <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> size));</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="keyword">typedef</span> void (*free_func) <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#a2de3690ae41712f1488ce8b89b07141a">voidpf</a> opaque, <a class="code" href="zconf_8h.html#a2de3690ae41712f1488ce8b89b07141a">voidpf</a> address));</div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  </div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="keyword">struct </span><a class="code" href="zlib_8h.html#structinternal__state">internal_state</a>;</div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  </div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="zlib_8h.html"> 85</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="zlib_8h.html#structz__stream__s">z_stream_s</a> {</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="zlib_8h.html#a19880e07a77d10515147e23b6379dd49"> 86</a></span>  <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *<a class="code" href="zlib_8h.html#a19880e07a77d10515147e23b6379dd49">next_in</a>; <span class="comment">/* next input byte */</span></div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="zlib_8h.html#a7eb50ccbfeb2368dd84c3a97f409692a"> 87</a></span>  <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> <a class="code" href="zlib_8h.html#a7eb50ccbfeb2368dd84c3a97f409692a">avail_in</a>; <span class="comment">/* number of bytes available at next_in */</span></div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="zlib_8h.html#aa301948b62e927cb5b34c7fa48b369e7"> 88</a></span>  <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zlib_8h.html#aa301948b62e927cb5b34c7fa48b369e7">total_in</a>; <span class="comment">/* total nb of input bytes read so far */</span></div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  </div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="zlib_8h.html#a6926e8fa9e456364c4a931da1508662e"> 90</a></span>  <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *<a class="code" href="zlib_8h.html#a6926e8fa9e456364c4a931da1508662e">next_out</a>; <span class="comment">/* next output byte should be put there */</span></div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="zlib_8h.html#aaf14708cee6cfc16ac27f3cff686f8d8"> 91</a></span>  <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> <a class="code" href="zlib_8h.html#aaf14708cee6cfc16ac27f3cff686f8d8">avail_out</a>; <span class="comment">/* remaining free space at next_out */</span></div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="zlib_8h.html#ace45f7b8af1035bc35ee7436fdd41081"> 92</a></span>  <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zlib_8h.html#ace45f7b8af1035bc35ee7436fdd41081">total_out</a>; <span class="comment">/* total nb of bytes output so far */</span></div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  </div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="zlib_8h.html#a32d2f5216cddb59c7cc8fb2806a7e727"> 94</a></span>  <span class="keywordtype">char</span> *<a class="code" href="zlib_8h.html#a32d2f5216cddb59c7cc8fb2806a7e727">msg</a>; <span class="comment">/* last error message, NULL if no error */</span></div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="zlib_8h.html#ac21f94cab4411ce1c77771033cff040a"> 95</a></span>  <span class="keyword">struct </span><a class="code" href="zlib_8h.html#structinternal__state">internal_state</a> <a class="code" href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a> *<a class="code" href="zlib_8h.html#ac21f94cab4411ce1c77771033cff040a">state</a>; <span class="comment">/* not visible by applications */</span></div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  </div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="zlib_8h.html#a0b2f68e949d83a93be0e4d0b88148c80"> 97</a></span>  alloc_func <a class="code" href="zlib_8h.html#a0b2f68e949d83a93be0e4d0b88148c80">zalloc</a>; <span class="comment">/* used to allocate the internal state */</span></div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="zlib_8h.html#a7587bb1e332fc8f57ef74071eeec8070"> 98</a></span>  free_func <a class="code" href="zlib_8h.html#a7587bb1e332fc8f57ef74071eeec8070">zfree</a>; <span class="comment">/* used to free the internal state */</span></div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="zlib_8h.html#afb43594753f721206f8751bdc6f311ec"> 99</a></span>  <a class="code" href="zconf_8h.html#a2de3690ae41712f1488ce8b89b07141a">voidpf</a> <a class="code" href="zlib_8h.html#afb43594753f721206f8751bdc6f311ec">opaque</a>; <span class="comment">/* private data object passed to zalloc and zfree */</span></div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  </div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="zlib_8h.html#a47eb6f1029f8333d4e55b08296f900dd"> 101</a></span>  <span class="keywordtype">int</span> <a class="code" href="zlib_8h.html#a47eb6f1029f8333d4e55b08296f900dd">data_type</a>; <span class="comment">/* best guess about the data type: binary or text */</span></div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="zlib_8h.html#a74bb92610e11a5515a286f04f906d0db"> 102</a></span>  <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zlib_8h.html#a74bb92610e11a5515a286f04f906d0db">adler</a>; <span class="comment">/* adler32 value of the uncompressed data */</span></div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="zlib_8h.html#ae3bf2150b8009b089ae6878004146180"> 103</a></span>  <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zlib_8h.html#ae3bf2150b8009b089ae6878004146180">reserved</a>; <span class="comment">/* reserved for future use */</span></div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> } <a class="code" href="zlib_8h.html#aa4751fbf6d882976fb300ea9815f5010">z_stream</a>;</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  </div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6"> 106</a></span> <span class="keyword">typedef</span> <a class="code" href="zlib_8h.html#structz__stream__s">z_stream</a> <a class="code" href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a> *<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a>;</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  </div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"> gzip header information passed to and from zlib routines. See RFC 1952</span></div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"> for more details on the meanings of these fields.</span></div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="zlib_8h.html"> 112</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="zlib_8h.html#structgz__header__s">gz_header_s</a> {</div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="zlib_8h.html#acb727b700580681a32b288d9ebc9b762"> 113</a></span>  <span class="keywordtype">int</span> <a class="code" href="zlib_8h.html#acb727b700580681a32b288d9ebc9b762">text</a>; <span class="comment">/* true if compressed data believed to be text */</span></div>
|
|
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="zlib_8h.html#a4d66380f18f556788b252ca3bb0492a0"> 114</a></span>  <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zlib_8h.html#a4d66380f18f556788b252ca3bb0492a0">time</a>; <span class="comment">/* modification time */</span></div>
|
|
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="zlib_8h.html#a5890059f779baab7fc72bca5e3900552"> 115</a></span>  <span class="keywordtype">int</span> <a class="code" href="zlib_8h.html#a5890059f779baab7fc72bca5e3900552">xflags</a>; <span class="comment">/* extra flags (not used when writing a gzip file) */</span></div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="zlib_8h.html#a0c98ab56e4779bc5f994fdff60723115"> 116</a></span>  <span class="keywordtype">int</span> <a class="code" href="zlib_8h.html#a0c98ab56e4779bc5f994fdff60723115">os</a>; <span class="comment">/* operating system */</span></div>
|
|
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="zlib_8h.html#a2b260b4b03b66af0a115704504632b68"> 117</a></span>  <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *<a class="code" href="zlib_8h.html#a2b260b4b03b66af0a115704504632b68">extra</a>; <span class="comment">/* pointer to extra field or Z_NULL if none */</span></div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="zlib_8h.html#a5ded8c4f212b31a3ad229496d74f1239"> 118</a></span>  <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> <a class="code" href="zlib_8h.html#a5ded8c4f212b31a3ad229496d74f1239">extra_len</a>; <span class="comment">/* extra field length (valid if extra != Z_NULL) */</span></div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="zlib_8h.html#a8dcbcbd67c34445b41842b73a6d768f1"> 119</a></span>  <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> <a class="code" href="zlib_8h.html#a8dcbcbd67c34445b41842b73a6d768f1">extra_max</a>; <span class="comment">/* space at extra (only when reading header) */</span></div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="zlib_8h.html#adbc87684a91f1ff13ca81f2202630b34"> 120</a></span>  <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *<a class="code" href="zlib_8h.html#adbc87684a91f1ff13ca81f2202630b34">name</a>; <span class="comment">/* pointer to zero-terminated file name or Z_NULL */</span></div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="zlib_8h.html#af5b7779d893562b8e759efd582d4fcba"> 121</a></span>  <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> <a class="code" href="zlib_8h.html#af5b7779d893562b8e759efd582d4fcba">name_max</a>; <span class="comment">/* space at name (only when reading header) */</span></div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="zlib_8h.html#ac4e81bcead752082c53d69e098298de1"> 122</a></span>  <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *<a class="code" href="zlib_8h.html#ac4e81bcead752082c53d69e098298de1">comment</a>; <span class="comment">/* pointer to zero-terminated comment or Z_NULL */</span></div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="zlib_8h.html#a6cec1c0c3a9ac1b3c0a8975e382a2b7f"> 123</a></span>  <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> <a class="code" href="zlib_8h.html#a6cec1c0c3a9ac1b3c0a8975e382a2b7f">comm_max</a>; <span class="comment">/* space at comment (only when reading header) */</span></div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="zlib_8h.html#ab54066d1aca7e674fbc6d5579cc48894"> 124</a></span>  <span class="keywordtype">int</span> <a class="code" href="zlib_8h.html#ab54066d1aca7e674fbc6d5579cc48894">hcrc</a>; <span class="comment">/* true if there was or will be a header crc */</span></div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="zlib_8h.html#a5992b274cfdcacdbc1fa8347fd01ebde"> 125</a></span>  <span class="keywordtype">int</span> <a class="code" href="zlib_8h.html#a5992b274cfdcacdbc1fa8347fd01ebde">done</a>; <span class="comment">/* true when done reading gzip header (not used</span></div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="comment"> when writing a gzip file) */</span></div>
|
|
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> } <a class="code" href="zlib_8h.html#aae85b4a4f7931ee1f67f54c459007421">gz_header</a>;</div>
|
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  </div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="zlib_8h.html#a40e9dcc294796d99b25e98fb06477fc8"> 129</a></span> <span class="keyword">typedef</span> <a class="code" href="zlib_8h.html#structgz__header__s">gz_header</a> <a class="code" href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a> *<a class="code" href="zlib_8h.html#a40e9dcc294796d99b25e98fb06477fc8">gz_headerp</a>;</div>
|
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  </div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment"> The application must update next_in and avail_in when avail_in has dropped</span></div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment"> to zero. It must update next_out and avail_out when avail_out has dropped</span></div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="comment"> to zero. The application must initialize zalloc, zfree and opaque before</span></div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="comment"> calling the init function. All other fields are set by the compression</span></div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <span class="comment"> library and must not be updated by the application.</span></div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="comment"> The opaque value provided by the application will be passed as the first</span></div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> <span class="comment"> parameter for calls of zalloc and zfree. This can be useful for custom</span></div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="comment"> memory management. The compression library attaches no meaning to the</span></div>
|
|
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> <span class="comment"> opaque value.</span></div>
|
|
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="comment"> zalloc must return Z_NULL if there is not enough memory for the object.</span></div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="comment"> If zlib is used in a multi-threaded application, zalloc and zfree must be</span></div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="comment"> thread safe.</span></div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <span class="comment"> On 16-bit systems, the functions zalloc and zfree must be able to allocate</span></div>
|
|
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="comment"> exactly 65536 bytes, but will not be required to allocate more than this if</span></div>
|
|
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="comment"> the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers</span></div>
|
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="comment"> returned by zalloc for objects of exactly 65536 bytes *must* have their</span></div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="comment"> offset normalized to zero. The default allocation function provided by this</span></div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="comment"> library ensures this (see zutil.c). To reduce memory requirements and avoid</span></div>
|
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="comment"> any allocation of 64K objects, at the expense of compression ratio, compile</span></div>
|
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="comment"> the library with -DMAX_WBITS=14 (see zconf.h).</span></div>
|
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="comment"> The fields total_in and total_out can be used for statistics or progress</span></div>
|
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="comment"> reports. After compression, total_in holds the total size of the</span></div>
|
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="comment"> uncompressed data and may be saved for use in the decompressor (particularly</span></div>
|
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="comment"> if the decompressor wants to decompress everything in a single step).</span></div>
|
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  </div>
|
|
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="comment">/* constants */</span></div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  </div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="zlib_8h.html#ac3b62e37b9922d9496014515acd6083a"> 164</a></span> <span class="preprocessor">#define Z_NO_FLUSH 0</span></div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="zlib_8h.html#adbd49089a5611593f05ac80c9e12cc7f"> 165</a></span> <span class="preprocessor">#define Z_PARTIAL_FLUSH 1</span></div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="zlib_8h.html#aa32ca175522e0ef314f4dc0b0196bada"> 166</a></span> <span class="preprocessor">#define Z_SYNC_FLUSH 2</span></div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="zlib_8h.html#aed4fbb038c3973aacf52fccffbc44b53"> 167</a></span> <span class="preprocessor">#define Z_FULL_FLUSH 3</span></div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="zlib_8h.html#a876a626ba14eb12eea4bbf6823b6ca50"> 168</a></span> <span class="preprocessor">#define Z_FINISH 4</span></div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="zlib_8h.html#a73e5f4c24156c63ba863014396685062"> 169</a></span> <span class="preprocessor">#define Z_BLOCK 5</span></div>
|
|
<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="zlib_8h.html#a0c44b4d8d05cacb1227b535cd8ed538f"> 170</a></span> <span class="preprocessor">#define Z_TREES 6</span></div>
|
|
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <span class="comment">/* Allowed flush values; see deflate() and inflate() below for details */</span></div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  </div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="zlib_8h.html#a8cb802b6a11e926478dc6547c514c65c"> 173</a></span> <span class="preprocessor">#define Z_OK 0</span></div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="zlib_8h.html#a7d94a4a852228a899864a0053162e7a8"> 174</a></span> <span class="preprocessor">#define Z_STREAM_END 1</span></div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="zlib_8h.html#a32916ba675b2d06463da2576b6a49d64"> 175</a></span> <span class="preprocessor">#define Z_NEED_DICT 2</span></div>
|
|
<div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="zlib_8h.html#a3c66d64c427c0337c64e578537478737"> 176</a></span> <span class="preprocessor">#define Z_ERRNO (-1)</span></div>
|
|
<div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="zlib_8h.html#aad97cde83a9a4bb77f5c3b03bb68e483"> 177</a></span> <span class="preprocessor">#define Z_STREAM_ERROR (-2)</span></div>
|
|
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="zlib_8h.html#a9eda83d428a71752d148f38b5dbe04f2"> 178</a></span> <span class="preprocessor">#define Z_DATA_ERROR (-3)</span></div>
|
|
<div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="zlib_8h.html#ae2be6be871e377c6e2c25a7296ce320c"> 179</a></span> <span class="preprocessor">#define Z_MEM_ERROR (-4)</span></div>
|
|
<div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="zlib_8h.html#a425e2f0664e1b1f75bf2bffab88d353d"> 180</a></span> <span class="preprocessor">#define Z_BUF_ERROR (-5)</span></div>
|
|
<div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="zlib_8h.html#a7634cdd55f955ee1be99c065c6977371"> 181</a></span> <span class="preprocessor">#define Z_VERSION_ERROR (-6)</span></div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="comment">/* Return codes for the compression/decompression functions. Negative values</span></div>
|
|
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <span class="comment"> * are errors, positive values are used for special but normal events.</span></div>
|
|
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span> <span class="comment"> */</span></div>
|
|
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  </div>
|
|
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="zlib_8h.html#a496a4523776bcfa14568cd083b59f24c"> 186</a></span> <span class="preprocessor">#define Z_NO_COMPRESSION 0</span></div>
|
|
<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="zlib_8h.html#ad5222ae19b77c6e83815d07ca5d03fd8"> 187</a></span> <span class="preprocessor">#define Z_BEST_SPEED 1</span></div>
|
|
<div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="zlib_8h.html#a8db83edd9dea51f8cf0afd1727838b95"> 188</a></span> <span class="preprocessor">#define Z_BEST_COMPRESSION 9</span></div>
|
|
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="zlib_8h.html#af5387baee05124298e431ebe6fe96b17"> 189</a></span> <span class="preprocessor">#define Z_DEFAULT_COMPRESSION (-1)</span></div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span> <span class="comment">/* compression levels */</span></div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  </div>
|
|
<div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="zlib_8h.html#af01ccb5a9db8d415cde987d9553ad200"> 192</a></span> <span class="preprocessor">#define Z_FILTERED 1</span></div>
|
|
<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="zlib_8h.html#a1eec3d3720ba91fd54fa08d2757c1785"> 193</a></span> <span class="preprocessor">#define Z_HUFFMAN_ONLY 2</span></div>
|
|
<div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="zlib_8h.html#af52c1220e7193d2da78332d75f9251ea"> 194</a></span> <span class="preprocessor">#define Z_RLE 3</span></div>
|
|
<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="zlib_8h.html#aaa5c996fbc985d5ec43f99112c0ac4a6"> 195</a></span> <span class="preprocessor">#define Z_FIXED 4</span></div>
|
|
<div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="zlib_8h.html#a580d7c2527e653ddd783109271750849"> 196</a></span> <span class="preprocessor">#define Z_DEFAULT_STRATEGY 0</span></div>
|
|
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span> <span class="comment">/* compression strategy; see deflateInit2() below for details */</span></div>
|
|
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  </div>
|
|
<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="zlib_8h.html#a2bfe22ed89d3553335d18a4c3cab67af"> 199</a></span> <span class="preprocessor">#define Z_BINARY 0</span></div>
|
|
<div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="zlib_8h.html#ac5c9021ac9271248094c6b93c61e1f02"> 200</a></span> <span class="preprocessor">#define Z_TEXT 1</span></div>
|
|
<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="zlib_8h.html#a9a852d9163cdb10687403d4e79dda06e"> 201</a></span> <span class="preprocessor">#define Z_ASCII Z_TEXT </span><span class="comment">/* for compatibility with 1.2.2 and earlier */</span><span class="preprocessor"></span></div>
|
|
<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="zlib_8h.html#a4be54d9d68d40adb73f87492284cc290"> 202</a></span> <span class="preprocessor">#define Z_UNKNOWN 2</span></div>
|
|
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span> <span class="comment">/* Possible values of the data_type field (though see inflate()) */</span></div>
|
|
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  </div>
|
|
<div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="zlib_8h.html#a27a96226f3dc88e4743131c632adf32f"> 205</a></span> <span class="preprocessor">#define Z_DEFLATED 8</span></div>
|
|
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span> <span class="comment">/* The deflate compression method (the only one supported in this version) */</span></div>
|
|
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  </div>
|
|
<div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="zlib_8h.html#ad15afa2776b41b2f4d8582dd152bd736"> 208</a></span> <span class="preprocessor">#define Z_NULL 0 </span><span class="comment">/* for initializing zalloc, zfree, opaque */</span><span class="preprocessor"></span></div>
|
|
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  </div>
|
|
<div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="zlib_8h.html#a1f228220c3e6935eb171761c61487059"> 210</a></span> <span class="preprocessor">#define zlib_version zlibVersion()</span></div>
|
|
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span> <span class="comment">/* for compatibility with versions < 1.0.2 */</span></div>
|
|
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  </div>
|
|
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  </div>
|
|
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="comment">/* basic functions */</span></div>
|
|
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  </div>
|
|
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> zlibVersion <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<span class="keywordtype">void</span>));</div>
|
|
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span> <span class="comment">/* The application can compare zlibVersion and ZLIB_VERSION for consistency.</span></div>
|
|
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span> <span class="comment"> If the first character differs, the library code actually used is not</span></div>
|
|
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span> <span class="comment"> compatible with the zlib.h header file used by the application. This check</span></div>
|
|
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span> <span class="comment"> is automatically made by deflateInit and inflateInit.</span></div>
|
|
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span> <span class="comment"> */</span></div>
|
|
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  </div>
|
|
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span> <span class="comment">ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));</span></div>
|
|
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span> <span class="comment"> Initializes the internal stream state for compression. The fields</span></div>
|
|
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span> <span class="comment"> zalloc, zfree and opaque must be initialized before by the caller. If</span></div>
|
|
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span> <span class="comment"> zalloc and zfree are set to Z_NULL, deflateInit updates them to use default</span></div>
|
|
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span> <span class="comment"> allocation functions.</span></div>
|
|
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span> <span class="comment"> The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:</span></div>
|
|
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span> <span class="comment"> 1 gives best speed, 9 gives best compression, 0 gives no compression at all</span></div>
|
|
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span> <span class="comment"> (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION</span></div>
|
|
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span> <span class="comment"> requests a default compromise between speed and compression (currently</span></div>
|
|
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span> <span class="comment"> equivalent to level 6).</span></div>
|
|
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span> <span class="comment"> deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough</span></div>
|
|
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span> <span class="comment"> memory, Z_STREAM_ERROR if level is not a valid compression level, or</span></div>
|
|
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span> <span class="comment"> Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible</span></div>
|
|
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span> <span class="comment"> with the version assumed by the caller (ZLIB_VERSION). msg is set to null</span></div>
|
|
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span> <span class="comment"> if there is no error message. deflateInit does not perform any compression:</span></div>
|
|
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span> <span class="comment"> this will be done by deflate().</span></div>
|
|
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  </div>
|
|
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  </div>
|
|
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflate <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm, <span class="keywordtype">int</span> flush));</div>
|
|
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span> <span class="comment"> deflate compresses as much data as possible, and stops when the input</span></div>
|
|
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span> <span class="comment"> buffer becomes empty or the output buffer becomes full. It may introduce</span></div>
|
|
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span> <span class="comment"> some output latency (reading input without producing any output) except when</span></div>
|
|
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span> <span class="comment"> forced to flush.</span></div>
|
|
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span> <span class="comment"> The detailed semantics are as follows. deflate performs one or both of the</span></div>
|
|
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span> <span class="comment"> following actions:</span></div>
|
|
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span> <span class="comment"> - Compress more input starting at next_in and update next_in and avail_in</span></div>
|
|
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span> <span class="comment"> accordingly. If not all input can be processed (because there is not</span></div>
|
|
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span> <span class="comment"> enough room in the output buffer), next_in and avail_in are updated and</span></div>
|
|
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span> <span class="comment"> processing will resume at this point for the next call of deflate().</span></div>
|
|
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span> <span class="comment"> - Provide more output starting at next_out and update next_out and avail_out</span></div>
|
|
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span> <span class="comment"> accordingly. This action is forced if the parameter flush is non zero.</span></div>
|
|
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span> <span class="comment"> Forcing flush frequently degrades the compression ratio, so this parameter</span></div>
|
|
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span> <span class="comment"> should be set only when necessary (in interactive applications). Some</span></div>
|
|
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span> <span class="comment"> output may be provided even if flush is not set.</span></div>
|
|
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span> <span class="comment"> Before the call of deflate(), the application should ensure that at least</span></div>
|
|
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span> <span class="comment"> one of the actions is possible, by providing more input and/or consuming more</span></div>
|
|
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span> <span class="comment"> output, and updating avail_in or avail_out accordingly; avail_out should</span></div>
|
|
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span> <span class="comment"> never be zero before the call. The application can consume the compressed</span></div>
|
|
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span> <span class="comment"> output when it wants, for example when the output buffer is full (avail_out</span></div>
|
|
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span> <span class="comment"> == 0), or after each call of deflate(). If deflate returns Z_OK and with</span></div>
|
|
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span> <span class="comment"> zero avail_out, it must be called again after making room in the output</span></div>
|
|
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span> <span class="comment"> buffer because there might be more output pending.</span></div>
|
|
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span> <span class="comment"> Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to</span></div>
|
|
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span> <span class="comment"> decide how much data to accumulate before producing output, in order to</span></div>
|
|
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span> <span class="comment"> maximize compression.</span></div>
|
|
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span> <span class="comment"> If the parameter flush is set to Z_SYNC_FLUSH, all pending output is</span></div>
|
|
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span> <span class="comment"> flushed to the output buffer and the output is aligned on a byte boundary, so</span></div>
|
|
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span> <span class="comment"> that the decompressor can get all input data available so far. (In</span></div>
|
|
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span> <span class="comment"> particular avail_in is zero after the call if enough output space has been</span></div>
|
|
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span> <span class="comment"> provided before the call.) Flushing may degrade compression for some</span></div>
|
|
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span> <span class="comment"> compression algorithms and so it should be used only when necessary. This</span></div>
|
|
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span> <span class="comment"> completes the current deflate block and follows it with an empty stored block</span></div>
|
|
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span> <span class="comment"> that is three bits plus filler bits to the next byte, followed by four bytes</span></div>
|
|
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span> <span class="comment"> (00 00 ff ff).</span></div>
|
|
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span> <span class="comment"> If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the</span></div>
|
|
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span> <span class="comment"> output buffer, but the output is not aligned to a byte boundary. All of the</span></div>
|
|
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span> <span class="comment"> input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.</span></div>
|
|
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span> <span class="comment"> This completes the current deflate block and follows it with an empty fixed</span></div>
|
|
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span> <span class="comment"> codes block that is 10 bits long. This assures that enough bytes are output</span></div>
|
|
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span> <span class="comment"> in order for the decompressor to finish the block before the empty fixed code</span></div>
|
|
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span> <span class="comment"> block.</span></div>
|
|
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span> <span class="comment"> If flush is set to Z_BLOCK, a deflate block is completed and emitted, as</span></div>
|
|
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span> <span class="comment"> for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to</span></div>
|
|
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span> <span class="comment"> seven bits of the current block are held to be written as the next byte after</span></div>
|
|
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span> <span class="comment"> the next deflate block is completed. In this case, the decompressor may not</span></div>
|
|
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span> <span class="comment"> be provided enough bits at this point in order to complete decompression of</span></div>
|
|
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span> <span class="comment"> the data provided so far to the compressor. It may need to wait for the next</span></div>
|
|
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span> <span class="comment"> block to be emitted. This is for advanced applications that need to control</span></div>
|
|
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span> <span class="comment"> the emission of deflate blocks.</span></div>
|
|
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span> <span class="comment"> If flush is set to Z_FULL_FLUSH, all output is flushed as with</span></div>
|
|
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span> <span class="comment"> Z_SYNC_FLUSH, and the compression state is reset so that decompression can</span></div>
|
|
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span> <span class="comment"> restart from this point if previous compressed data has been damaged or if</span></div>
|
|
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span> <span class="comment"> random access is desired. Using Z_FULL_FLUSH too often can seriously degrade</span></div>
|
|
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span> <span class="comment"> compression.</span></div>
|
|
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span> <span class="comment"> If deflate returns with avail_out == 0, this function must be called again</span></div>
|
|
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span> <span class="comment"> with the same value of the flush parameter and more output space (updated</span></div>
|
|
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span> <span class="comment"> avail_out), until the flush is complete (deflate returns with non-zero</span></div>
|
|
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span> <span class="comment"> avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that</span></div>
|
|
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span> <span class="comment"> avail_out is greater than six to avoid repeated flush markers due to</span></div>
|
|
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span> <span class="comment"> avail_out == 0 on return.</span></div>
|
|
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span> <span class="comment"> If the parameter flush is set to Z_FINISH, pending input is processed,</span></div>
|
|
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span> <span class="comment"> pending output is flushed and deflate returns with Z_STREAM_END if there was</span></div>
|
|
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span> <span class="comment"> enough output space; if deflate returns with Z_OK, this function must be</span></div>
|
|
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span> <span class="comment"> called again with Z_FINISH and more output space (updated avail_out) but no</span></div>
|
|
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span> <span class="comment"> more input data, until it returns with Z_STREAM_END or an error. After</span></div>
|
|
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span> <span class="comment"> deflate has returned Z_STREAM_END, the only possible operations on the stream</span></div>
|
|
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span> <span class="comment"> are deflateReset or deflateEnd.</span></div>
|
|
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span> <span class="comment"> Z_FINISH can be used immediately after deflateInit if all the compression</span></div>
|
|
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span> <span class="comment"> is to be done in a single step. In this case, avail_out must be at least the</span></div>
|
|
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span> <span class="comment"> value returned by deflateBound (see below). If deflate does not return</span></div>
|
|
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span> <span class="comment"> Z_STREAM_END, then it must be called again as described above.</span></div>
|
|
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span> <span class="comment"> deflate() sets strm->adler to the adler32 checksum of all input read</span></div>
|
|
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span> <span class="comment"> so far (that is, total_in bytes).</span></div>
|
|
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span> <span class="comment"> deflate() may update strm->data_type if it can make a good guess about</span></div>
|
|
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span> <span class="comment"> the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered</span></div>
|
|
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span> <span class="comment"> binary. This field is only for information purposes and does not affect the</span></div>
|
|
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span> <span class="comment"> compression algorithm in any manner.</span></div>
|
|
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span> <span class="comment"> deflate() returns Z_OK if some progress has been made (more input</span></div>
|
|
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span> <span class="comment"> processed or more output produced), Z_STREAM_END if all input has been</span></div>
|
|
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span> <span class="comment"> consumed and all output has been produced (only when flush is set to</span></div>
|
|
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span> <span class="comment"> Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example</span></div>
|
|
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span> <span class="comment"> if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible</span></div>
|
|
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span> <span class="comment"> (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not</span></div>
|
|
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span> <span class="comment"> fatal, and deflate() can be called again with more input and more output</span></div>
|
|
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span> <span class="comment"> space to continue compressing.</span></div>
|
|
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  </div>
|
|
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  </div>
|
|
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflateEnd <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm));</div>
|
|
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span> <span class="comment"> All dynamically allocated data structures for this stream are freed.</span></div>
|
|
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span> <span class="comment"> This function discards any unprocessed input and does not flush any pending</span></div>
|
|
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span> <span class="comment"> output.</span></div>
|
|
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span> <span class="comment"> deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the</span></div>
|
|
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span> <span class="comment"> stream state was inconsistent, Z_DATA_ERROR if the stream was freed</span></div>
|
|
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span> <span class="comment"> prematurely (some input or output was discarded). In the error case, msg</span></div>
|
|
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span> <span class="comment"> may be set but then points to a static string (which must not be</span></div>
|
|
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span> <span class="comment"> deallocated).</span></div>
|
|
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  </div>
|
|
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  </div>
|
|
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span> <span class="comment">ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));</span></div>
|
|
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span> <span class="comment"> Initializes the internal stream state for decompression. The fields</span></div>
|
|
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span> <span class="comment"> next_in, avail_in, zalloc, zfree and opaque must be initialized before by</span></div>
|
|
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span> <span class="comment"> the caller. If next_in is not Z_NULL and avail_in is large enough (the</span></div>
|
|
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span> <span class="comment"> exact value depends on the compression method), inflateInit determines the</span></div>
|
|
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span> <span class="comment"> compression method from the zlib header and allocates all data structures</span></div>
|
|
<div class="line"><a name="l00374"></a><span class="lineno"> 374</span> <span class="comment"> accordingly; otherwise the allocation will be deferred to the first call of</span></div>
|
|
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span> <span class="comment"> inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to</span></div>
|
|
<div class="line"><a name="l00376"></a><span class="lineno"> 376</span> <span class="comment"> use default allocation functions.</span></div>
|
|
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span> <span class="comment"> inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough</span></div>
|
|
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span> <span class="comment"> memory, Z_VERSION_ERROR if the zlib library version is incompatible with the</span></div>
|
|
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span> <span class="comment"> version assumed by the caller, or Z_STREAM_ERROR if the parameters are</span></div>
|
|
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span> <span class="comment"> invalid, such as a null pointer to the structure. msg is set to null if</span></div>
|
|
<div class="line"><a name="l00382"></a><span class="lineno"> 382</span> <span class="comment"> there is no error message. inflateInit does not perform any decompression</span></div>
|
|
<div class="line"><a name="l00383"></a><span class="lineno"> 383</span> <span class="comment"> apart from possibly reading the zlib header if present: actual decompression</span></div>
|
|
<div class="line"><a name="l00384"></a><span class="lineno"> 384</span> <span class="comment"> will be done by inflate(). (So next_in and avail_in may be modified, but</span></div>
|
|
<div class="line"><a name="l00385"></a><span class="lineno"> 385</span> <span class="comment"> next_out and avail_out are unused and unchanged.) The current implementation</span></div>
|
|
<div class="line"><a name="l00386"></a><span class="lineno"> 386</span> <span class="comment"> of inflateInit() does not process any header information -- that is deferred</span></div>
|
|
<div class="line"><a name="l00387"></a><span class="lineno"> 387</span> <span class="comment"> until inflate() is called.</span></div>
|
|
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  </div>
|
|
<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  </div>
|
|
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflate <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm, <span class="keywordtype">int</span> flush));</div>
|
|
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00393"></a><span class="lineno"> 393</span> <span class="comment"> inflate decompresses as much data as possible, and stops when the input</span></div>
|
|
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span> <span class="comment"> buffer becomes empty or the output buffer becomes full. It may introduce</span></div>
|
|
<div class="line"><a name="l00395"></a><span class="lineno"> 395</span> <span class="comment"> some output latency (reading input without producing any output) except when</span></div>
|
|
<div class="line"><a name="l00396"></a><span class="lineno"> 396</span> <span class="comment"> forced to flush.</span></div>
|
|
<div class="line"><a name="l00397"></a><span class="lineno"> 397</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00398"></a><span class="lineno"> 398</span> <span class="comment"> The detailed semantics are as follows. inflate performs one or both of the</span></div>
|
|
<div class="line"><a name="l00399"></a><span class="lineno"> 399</span> <span class="comment"> following actions:</span></div>
|
|
<div class="line"><a name="l00400"></a><span class="lineno"> 400</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00401"></a><span class="lineno"> 401</span> <span class="comment"> - Decompress more input starting at next_in and update next_in and avail_in</span></div>
|
|
<div class="line"><a name="l00402"></a><span class="lineno"> 402</span> <span class="comment"> accordingly. If not all input can be processed (because there is not</span></div>
|
|
<div class="line"><a name="l00403"></a><span class="lineno"> 403</span> <span class="comment"> enough room in the output buffer), next_in is updated and processing will</span></div>
|
|
<div class="line"><a name="l00404"></a><span class="lineno"> 404</span> <span class="comment"> resume at this point for the next call of inflate().</span></div>
|
|
<div class="line"><a name="l00405"></a><span class="lineno"> 405</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00406"></a><span class="lineno"> 406</span> <span class="comment"> - Provide more output starting at next_out and update next_out and avail_out</span></div>
|
|
<div class="line"><a name="l00407"></a><span class="lineno"> 407</span> <span class="comment"> accordingly. inflate() provides as much output as possible, until there is</span></div>
|
|
<div class="line"><a name="l00408"></a><span class="lineno"> 408</span> <span class="comment"> no more input data or no more space in the output buffer (see below about</span></div>
|
|
<div class="line"><a name="l00409"></a><span class="lineno"> 409</span> <span class="comment"> the flush parameter).</span></div>
|
|
<div class="line"><a name="l00410"></a><span class="lineno"> 410</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00411"></a><span class="lineno"> 411</span> <span class="comment"> Before the call of inflate(), the application should ensure that at least</span></div>
|
|
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span> <span class="comment"> one of the actions is possible, by providing more input and/or consuming more</span></div>
|
|
<div class="line"><a name="l00413"></a><span class="lineno"> 413</span> <span class="comment"> output, and updating the next_* and avail_* values accordingly. The</span></div>
|
|
<div class="line"><a name="l00414"></a><span class="lineno"> 414</span> <span class="comment"> application can consume the uncompressed output when it wants, for example</span></div>
|
|
<div class="line"><a name="l00415"></a><span class="lineno"> 415</span> <span class="comment"> when the output buffer is full (avail_out == 0), or after each call of</span></div>
|
|
<div class="line"><a name="l00416"></a><span class="lineno"> 416</span> <span class="comment"> inflate(). If inflate returns Z_OK and with zero avail_out, it must be</span></div>
|
|
<div class="line"><a name="l00417"></a><span class="lineno"> 417</span> <span class="comment"> called again after making room in the output buffer because there might be</span></div>
|
|
<div class="line"><a name="l00418"></a><span class="lineno"> 418</span> <span class="comment"> more output pending.</span></div>
|
|
<div class="line"><a name="l00419"></a><span class="lineno"> 419</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00420"></a><span class="lineno"> 420</span> <span class="comment"> The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,</span></div>
|
|
<div class="line"><a name="l00421"></a><span class="lineno"> 421</span> <span class="comment"> Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much</span></div>
|
|
<div class="line"><a name="l00422"></a><span class="lineno"> 422</span> <span class="comment"> output as possible to the output buffer. Z_BLOCK requests that inflate()</span></div>
|
|
<div class="line"><a name="l00423"></a><span class="lineno"> 423</span> <span class="comment"> stop if and when it gets to the next deflate block boundary. When decoding</span></div>
|
|
<div class="line"><a name="l00424"></a><span class="lineno"> 424</span> <span class="comment"> the zlib or gzip format, this will cause inflate() to return immediately</span></div>
|
|
<div class="line"><a name="l00425"></a><span class="lineno"> 425</span> <span class="comment"> after the header and before the first block. When doing a raw inflate,</span></div>
|
|
<div class="line"><a name="l00426"></a><span class="lineno"> 426</span> <span class="comment"> inflate() will go ahead and process the first block, and will return when it</span></div>
|
|
<div class="line"><a name="l00427"></a><span class="lineno"> 427</span> <span class="comment"> gets to the end of that block, or when it runs out of data.</span></div>
|
|
<div class="line"><a name="l00428"></a><span class="lineno"> 428</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00429"></a><span class="lineno"> 429</span> <span class="comment"> The Z_BLOCK option assists in appending to or combining deflate streams.</span></div>
|
|
<div class="line"><a name="l00430"></a><span class="lineno"> 430</span> <span class="comment"> Also to assist in this, on return inflate() will set strm->data_type to the</span></div>
|
|
<div class="line"><a name="l00431"></a><span class="lineno"> 431</span> <span class="comment"> number of unused bits in the last byte taken from strm->next_in, plus 64 if</span></div>
|
|
<div class="line"><a name="l00432"></a><span class="lineno"> 432</span> <span class="comment"> inflate() is currently decoding the last block in the deflate stream, plus</span></div>
|
|
<div class="line"><a name="l00433"></a><span class="lineno"> 433</span> <span class="comment"> 128 if inflate() returned immediately after decoding an end-of-block code or</span></div>
|
|
<div class="line"><a name="l00434"></a><span class="lineno"> 434</span> <span class="comment"> decoding the complete header up to just before the first byte of the deflate</span></div>
|
|
<div class="line"><a name="l00435"></a><span class="lineno"> 435</span> <span class="comment"> stream. The end-of-block will not be indicated until all of the uncompressed</span></div>
|
|
<div class="line"><a name="l00436"></a><span class="lineno"> 436</span> <span class="comment"> data from that block has been written to strm->next_out. The number of</span></div>
|
|
<div class="line"><a name="l00437"></a><span class="lineno"> 437</span> <span class="comment"> unused bits may in general be greater than seven, except when bit 7 of</span></div>
|
|
<div class="line"><a name="l00438"></a><span class="lineno"> 438</span> <span class="comment"> data_type is set, in which case the number of unused bits will be less than</span></div>
|
|
<div class="line"><a name="l00439"></a><span class="lineno"> 439</span> <span class="comment"> eight. data_type is set as noted here every time inflate() returns for all</span></div>
|
|
<div class="line"><a name="l00440"></a><span class="lineno"> 440</span> <span class="comment"> flush options, and so can be used to determine the amount of currently</span></div>
|
|
<div class="line"><a name="l00441"></a><span class="lineno"> 441</span> <span class="comment"> consumed input in bits.</span></div>
|
|
<div class="line"><a name="l00442"></a><span class="lineno"> 442</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00443"></a><span class="lineno"> 443</span> <span class="comment"> The Z_TREES option behaves as Z_BLOCK does, but it also returns when the</span></div>
|
|
<div class="line"><a name="l00444"></a><span class="lineno"> 444</span> <span class="comment"> end of each deflate block header is reached, before any actual data in that</span></div>
|
|
<div class="line"><a name="l00445"></a><span class="lineno"> 445</span> <span class="comment"> block is decoded. This allows the caller to determine the length of the</span></div>
|
|
<div class="line"><a name="l00446"></a><span class="lineno"> 446</span> <span class="comment"> deflate block header for later use in random access within a deflate block.</span></div>
|
|
<div class="line"><a name="l00447"></a><span class="lineno"> 447</span> <span class="comment"> 256 is added to the value of strm->data_type when inflate() returns</span></div>
|
|
<div class="line"><a name="l00448"></a><span class="lineno"> 448</span> <span class="comment"> immediately after reaching the end of the deflate block header.</span></div>
|
|
<div class="line"><a name="l00449"></a><span class="lineno"> 449</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00450"></a><span class="lineno"> 450</span> <span class="comment"> inflate() should normally be called until it returns Z_STREAM_END or an</span></div>
|
|
<div class="line"><a name="l00451"></a><span class="lineno"> 451</span> <span class="comment"> error. However if all decompression is to be performed in a single step (a</span></div>
|
|
<div class="line"><a name="l00452"></a><span class="lineno"> 452</span> <span class="comment"> single call of inflate), the parameter flush should be set to Z_FINISH. In</span></div>
|
|
<div class="line"><a name="l00453"></a><span class="lineno"> 453</span> <span class="comment"> this case all pending input is processed and all pending output is flushed;</span></div>
|
|
<div class="line"><a name="l00454"></a><span class="lineno"> 454</span> <span class="comment"> avail_out must be large enough to hold all the uncompressed data. (The size</span></div>
|
|
<div class="line"><a name="l00455"></a><span class="lineno"> 455</span> <span class="comment"> of the uncompressed data may have been saved by the compressor for this</span></div>
|
|
<div class="line"><a name="l00456"></a><span class="lineno"> 456</span> <span class="comment"> purpose.) The next operation on this stream must be inflateEnd to deallocate</span></div>
|
|
<div class="line"><a name="l00457"></a><span class="lineno"> 457</span> <span class="comment"> the decompression state. The use of Z_FINISH is never required, but can be</span></div>
|
|
<div class="line"><a name="l00458"></a><span class="lineno"> 458</span> <span class="comment"> used to inform inflate that a faster approach may be used for the single</span></div>
|
|
<div class="line"><a name="l00459"></a><span class="lineno"> 459</span> <span class="comment"> inflate() call.</span></div>
|
|
<div class="line"><a name="l00460"></a><span class="lineno"> 460</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00461"></a><span class="lineno"> 461</span> <span class="comment"> In this implementation, inflate() always flushes as much output as</span></div>
|
|
<div class="line"><a name="l00462"></a><span class="lineno"> 462</span> <span class="comment"> possible to the output buffer, and always uses the faster approach on the</span></div>
|
|
<div class="line"><a name="l00463"></a><span class="lineno"> 463</span> <span class="comment"> first call. So the only effect of the flush parameter in this implementation</span></div>
|
|
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span> <span class="comment"> is on the return value of inflate(), as noted below, or when it returns early</span></div>
|
|
<div class="line"><a name="l00465"></a><span class="lineno"> 465</span> <span class="comment"> because Z_BLOCK or Z_TREES is used.</span></div>
|
|
<div class="line"><a name="l00466"></a><span class="lineno"> 466</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00467"></a><span class="lineno"> 467</span> <span class="comment"> If a preset dictionary is needed after this call (see inflateSetDictionary</span></div>
|
|
<div class="line"><a name="l00468"></a><span class="lineno"> 468</span> <span class="comment"> below), inflate sets strm->adler to the adler32 checksum of the dictionary</span></div>
|
|
<div class="line"><a name="l00469"></a><span class="lineno"> 469</span> <span class="comment"> chosen by the compressor and returns Z_NEED_DICT; otherwise it sets</span></div>
|
|
<div class="line"><a name="l00470"></a><span class="lineno"> 470</span> <span class="comment"> strm->adler to the adler32 checksum of all output produced so far (that is,</span></div>
|
|
<div class="line"><a name="l00471"></a><span class="lineno"> 471</span> <span class="comment"> total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described</span></div>
|
|
<div class="line"><a name="l00472"></a><span class="lineno"> 472</span> <span class="comment"> below. At the end of the stream, inflate() checks that its computed adler32</span></div>
|
|
<div class="line"><a name="l00473"></a><span class="lineno"> 473</span> <span class="comment"> checksum is equal to that saved by the compressor and returns Z_STREAM_END</span></div>
|
|
<div class="line"><a name="l00474"></a><span class="lineno"> 474</span> <span class="comment"> only if the checksum is correct.</span></div>
|
|
<div class="line"><a name="l00475"></a><span class="lineno"> 475</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00476"></a><span class="lineno"> 476</span> <span class="comment"> inflate() can decompress and check either zlib-wrapped or gzip-wrapped</span></div>
|
|
<div class="line"><a name="l00477"></a><span class="lineno"> 477</span> <span class="comment"> deflate data. The header type is detected automatically, if requested when</span></div>
|
|
<div class="line"><a name="l00478"></a><span class="lineno"> 478</span> <span class="comment"> initializing with inflateInit2(). Any information contained in the gzip</span></div>
|
|
<div class="line"><a name="l00479"></a><span class="lineno"> 479</span> <span class="comment"> header is not retained, so applications that need that information should</span></div>
|
|
<div class="line"><a name="l00480"></a><span class="lineno"> 480</span> <span class="comment"> instead use raw inflate, see inflateInit2() below, or inflateBack() and</span></div>
|
|
<div class="line"><a name="l00481"></a><span class="lineno"> 481</span> <span class="comment"> perform their own processing of the gzip header and trailer.</span></div>
|
|
<div class="line"><a name="l00482"></a><span class="lineno"> 482</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00483"></a><span class="lineno"> 483</span> <span class="comment"> inflate() returns Z_OK if some progress has been made (more input processed</span></div>
|
|
<div class="line"><a name="l00484"></a><span class="lineno"> 484</span> <span class="comment"> or more output produced), Z_STREAM_END if the end of the compressed data has</span></div>
|
|
<div class="line"><a name="l00485"></a><span class="lineno"> 485</span> <span class="comment"> been reached and all uncompressed output has been produced, Z_NEED_DICT if a</span></div>
|
|
<div class="line"><a name="l00486"></a><span class="lineno"> 486</span> <span class="comment"> preset dictionary is needed at this point, Z_DATA_ERROR if the input data was</span></div>
|
|
<div class="line"><a name="l00487"></a><span class="lineno"> 487</span> <span class="comment"> corrupted (input stream not conforming to the zlib format or incorrect check</span></div>
|
|
<div class="line"><a name="l00488"></a><span class="lineno"> 488</span> <span class="comment"> value), Z_STREAM_ERROR if the stream structure was inconsistent (for example</span></div>
|
|
<div class="line"><a name="l00489"></a><span class="lineno"> 489</span> <span class="comment"> next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,</span></div>
|
|
<div class="line"><a name="l00490"></a><span class="lineno"> 490</span> <span class="comment"> Z_BUF_ERROR if no progress is possible or if there was not enough room in the</span></div>
|
|
<div class="line"><a name="l00491"></a><span class="lineno"> 491</span> <span class="comment"> output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and</span></div>
|
|
<div class="line"><a name="l00492"></a><span class="lineno"> 492</span> <span class="comment"> inflate() can be called again with more input and more output space to</span></div>
|
|
<div class="line"><a name="l00493"></a><span class="lineno"> 493</span> <span class="comment"> continue decompressing. If Z_DATA_ERROR is returned, the application may</span></div>
|
|
<div class="line"><a name="l00494"></a><span class="lineno"> 494</span> <span class="comment"> then call inflateSync() to look for a good compression block if a partial</span></div>
|
|
<div class="line"><a name="l00495"></a><span class="lineno"> 495</span> <span class="comment"> recovery of the data is desired.</span></div>
|
|
<div class="line"><a name="l00496"></a><span class="lineno"> 496</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  </div>
|
|
<div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  </div>
|
|
<div class="line"><a name="l00499"></a><span class="lineno"> 499</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateEnd <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm));</div>
|
|
<div class="line"><a name="l00500"></a><span class="lineno"> 500</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00501"></a><span class="lineno"> 501</span> <span class="comment"> All dynamically allocated data structures for this stream are freed.</span></div>
|
|
<div class="line"><a name="l00502"></a><span class="lineno"> 502</span> <span class="comment"> This function discards any unprocessed input and does not flush any pending</span></div>
|
|
<div class="line"><a name="l00503"></a><span class="lineno"> 503</span> <span class="comment"> output.</span></div>
|
|
<div class="line"><a name="l00504"></a><span class="lineno"> 504</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00505"></a><span class="lineno"> 505</span> <span class="comment"> inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state</span></div>
|
|
<div class="line"><a name="l00506"></a><span class="lineno"> 506</span> <span class="comment"> was inconsistent. In the error case, msg may be set but then points to a</span></div>
|
|
<div class="line"><a name="l00507"></a><span class="lineno"> 507</span> <span class="comment"> static string (which must not be deallocated).</span></div>
|
|
<div class="line"><a name="l00508"></a><span class="lineno"> 508</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  </div>
|
|
<div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  </div>
|
|
<div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <span class="comment">/* Advanced functions */</span></div>
|
|
<div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  </div>
|
|
<div class="line"><a name="l00513"></a><span class="lineno"> 513</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00514"></a><span class="lineno"> 514</span> <span class="comment"> The following functions are needed only in some special applications.</span></div>
|
|
<div class="line"><a name="l00515"></a><span class="lineno"> 515</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  </div>
|
|
<div class="line"><a name="l00517"></a><span class="lineno"> 517</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00518"></a><span class="lineno"> 518</span> <span class="comment">ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,</span></div>
|
|
<div class="line"><a name="l00519"></a><span class="lineno"> 519</span> <span class="comment"> int level,</span></div>
|
|
<div class="line"><a name="l00520"></a><span class="lineno"> 520</span> <span class="comment"> int method,</span></div>
|
|
<div class="line"><a name="l00521"></a><span class="lineno"> 521</span> <span class="comment"> int windowBits,</span></div>
|
|
<div class="line"><a name="l00522"></a><span class="lineno"> 522</span> <span class="comment"> int memLevel,</span></div>
|
|
<div class="line"><a name="l00523"></a><span class="lineno"> 523</span> <span class="comment"> int strategy));</span></div>
|
|
<div class="line"><a name="l00524"></a><span class="lineno"> 524</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00525"></a><span class="lineno"> 525</span> <span class="comment"> This is another version of deflateInit with more compression options. The</span></div>
|
|
<div class="line"><a name="l00526"></a><span class="lineno"> 526</span> <span class="comment"> fields next_in, zalloc, zfree and opaque must be initialized before by the</span></div>
|
|
<div class="line"><a name="l00527"></a><span class="lineno"> 527</span> <span class="comment"> caller.</span></div>
|
|
<div class="line"><a name="l00528"></a><span class="lineno"> 528</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00529"></a><span class="lineno"> 529</span> <span class="comment"> The method parameter is the compression method. It must be Z_DEFLATED in</span></div>
|
|
<div class="line"><a name="l00530"></a><span class="lineno"> 530</span> <span class="comment"> this version of the library.</span></div>
|
|
<div class="line"><a name="l00531"></a><span class="lineno"> 531</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00532"></a><span class="lineno"> 532</span> <span class="comment"> The windowBits parameter is the base two logarithm of the window size</span></div>
|
|
<div class="line"><a name="l00533"></a><span class="lineno"> 533</span> <span class="comment"> (the size of the history buffer). It should be in the range 8..15 for this</span></div>
|
|
<div class="line"><a name="l00534"></a><span class="lineno"> 534</span> <span class="comment"> version of the library. Larger values of this parameter result in better</span></div>
|
|
<div class="line"><a name="l00535"></a><span class="lineno"> 535</span> <span class="comment"> compression at the expense of memory usage. The default value is 15 if</span></div>
|
|
<div class="line"><a name="l00536"></a><span class="lineno"> 536</span> <span class="comment"> deflateInit is used instead.</span></div>
|
|
<div class="line"><a name="l00537"></a><span class="lineno"> 537</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00538"></a><span class="lineno"> 538</span> <span class="comment"> windowBits can also be -8..-15 for raw deflate. In this case, -windowBits</span></div>
|
|
<div class="line"><a name="l00539"></a><span class="lineno"> 539</span> <span class="comment"> determines the window size. deflate() will then generate raw deflate data</span></div>
|
|
<div class="line"><a name="l00540"></a><span class="lineno"> 540</span> <span class="comment"> with no zlib header or trailer, and will not compute an adler32 check value.</span></div>
|
|
<div class="line"><a name="l00541"></a><span class="lineno"> 541</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00542"></a><span class="lineno"> 542</span> <span class="comment"> windowBits can also be greater than 15 for optional gzip encoding. Add</span></div>
|
|
<div class="line"><a name="l00543"></a><span class="lineno"> 543</span> <span class="comment"> 16 to windowBits to write a simple gzip header and trailer around the</span></div>
|
|
<div class="line"><a name="l00544"></a><span class="lineno"> 544</span> <span class="comment"> compressed data instead of a zlib wrapper. The gzip header will have no</span></div>
|
|
<div class="line"><a name="l00545"></a><span class="lineno"> 545</span> <span class="comment"> file name, no extra data, no comment, no modification time (set to zero), no</span></div>
|
|
<div class="line"><a name="l00546"></a><span class="lineno"> 546</span> <span class="comment"> header crc, and the operating system will be set to 255 (unknown). If a</span></div>
|
|
<div class="line"><a name="l00547"></a><span class="lineno"> 547</span> <span class="comment"> gzip stream is being written, strm->adler is a crc32 instead of an adler32.</span></div>
|
|
<div class="line"><a name="l00548"></a><span class="lineno"> 548</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00549"></a><span class="lineno"> 549</span> <span class="comment"> The memLevel parameter specifies how much memory should be allocated</span></div>
|
|
<div class="line"><a name="l00550"></a><span class="lineno"> 550</span> <span class="comment"> for the internal compression state. memLevel=1 uses minimum memory but is</span></div>
|
|
<div class="line"><a name="l00551"></a><span class="lineno"> 551</span> <span class="comment"> slow and reduces compression ratio; memLevel=9 uses maximum memory for</span></div>
|
|
<div class="line"><a name="l00552"></a><span class="lineno"> 552</span> <span class="comment"> optimal speed. The default value is 8. See zconf.h for total memory usage</span></div>
|
|
<div class="line"><a name="l00553"></a><span class="lineno"> 553</span> <span class="comment"> as a function of windowBits and memLevel.</span></div>
|
|
<div class="line"><a name="l00554"></a><span class="lineno"> 554</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00555"></a><span class="lineno"> 555</span> <span class="comment"> The strategy parameter is used to tune the compression algorithm. Use the</span></div>
|
|
<div class="line"><a name="l00556"></a><span class="lineno"> 556</span> <span class="comment"> value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a</span></div>
|
|
<div class="line"><a name="l00557"></a><span class="lineno"> 557</span> <span class="comment"> filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no</span></div>
|
|
<div class="line"><a name="l00558"></a><span class="lineno"> 558</span> <span class="comment"> string match), or Z_RLE to limit match distances to one (run-length</span></div>
|
|
<div class="line"><a name="l00559"></a><span class="lineno"> 559</span> <span class="comment"> encoding). Filtered data consists mostly of small values with a somewhat</span></div>
|
|
<div class="line"><a name="l00560"></a><span class="lineno"> 560</span> <span class="comment"> random distribution. In this case, the compression algorithm is tuned to</span></div>
|
|
<div class="line"><a name="l00561"></a><span class="lineno"> 561</span> <span class="comment"> compress them better. The effect of Z_FILTERED is to force more Huffman</span></div>
|
|
<div class="line"><a name="l00562"></a><span class="lineno"> 562</span> <span class="comment"> coding and less string matching; it is somewhat intermediate between</span></div>
|
|
<div class="line"><a name="l00563"></a><span class="lineno"> 563</span> <span class="comment"> Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as</span></div>
|
|
<div class="line"><a name="l00564"></a><span class="lineno"> 564</span> <span class="comment"> fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The</span></div>
|
|
<div class="line"><a name="l00565"></a><span class="lineno"> 565</span> <span class="comment"> strategy parameter only affects the compression ratio but not the</span></div>
|
|
<div class="line"><a name="l00566"></a><span class="lineno"> 566</span> <span class="comment"> correctness of the compressed output even if it is not set appropriately.</span></div>
|
|
<div class="line"><a name="l00567"></a><span class="lineno"> 567</span> <span class="comment"> Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler</span></div>
|
|
<div class="line"><a name="l00568"></a><span class="lineno"> 568</span> <span class="comment"> decoder for special applications.</span></div>
|
|
<div class="line"><a name="l00569"></a><span class="lineno"> 569</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00570"></a><span class="lineno"> 570</span> <span class="comment"> deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough</span></div>
|
|
<div class="line"><a name="l00571"></a><span class="lineno"> 571</span> <span class="comment"> memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid</span></div>
|
|
<div class="line"><a name="l00572"></a><span class="lineno"> 572</span> <span class="comment"> method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is</span></div>
|
|
<div class="line"><a name="l00573"></a><span class="lineno"> 573</span> <span class="comment"> incompatible with the version assumed by the caller (ZLIB_VERSION). msg is</span></div>
|
|
<div class="line"><a name="l00574"></a><span class="lineno"> 574</span> <span class="comment"> set to null if there is no error message. deflateInit2 does not perform any</span></div>
|
|
<div class="line"><a name="l00575"></a><span class="lineno"> 575</span> <span class="comment"> compression: this will be done by deflate().</span></div>
|
|
<div class="line"><a name="l00576"></a><span class="lineno"> 576</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00577"></a><span class="lineno"> 577</span>  </div>
|
|
<div class="line"><a name="l00578"></a><span class="lineno"> 578</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflateSetDictionary <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  <span class="keyword">const</span> <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *dictionary,</div>
|
|
<div class="line"><a name="l00580"></a><span class="lineno"> 580</span>  <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> dictLength));</div>
|
|
<div class="line"><a name="l00581"></a><span class="lineno"> 581</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00582"></a><span class="lineno"> 582</span> <span class="comment"> Initializes the compression dictionary from the given byte sequence</span></div>
|
|
<div class="line"><a name="l00583"></a><span class="lineno"> 583</span> <span class="comment"> without producing any compressed output. This function must be called</span></div>
|
|
<div class="line"><a name="l00584"></a><span class="lineno"> 584</span> <span class="comment"> immediately after deflateInit, deflateInit2 or deflateReset, before any call</span></div>
|
|
<div class="line"><a name="l00585"></a><span class="lineno"> 585</span> <span class="comment"> of deflate. The compressor and decompressor must use exactly the same</span></div>
|
|
<div class="line"><a name="l00586"></a><span class="lineno"> 586</span> <span class="comment"> dictionary (see inflateSetDictionary).</span></div>
|
|
<div class="line"><a name="l00587"></a><span class="lineno"> 587</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00588"></a><span class="lineno"> 588</span> <span class="comment"> The dictionary should consist of strings (byte sequences) that are likely</span></div>
|
|
<div class="line"><a name="l00589"></a><span class="lineno"> 589</span> <span class="comment"> to be encountered later in the data to be compressed, with the most commonly</span></div>
|
|
<div class="line"><a name="l00590"></a><span class="lineno"> 590</span> <span class="comment"> used strings preferably put towards the end of the dictionary. Using a</span></div>
|
|
<div class="line"><a name="l00591"></a><span class="lineno"> 591</span> <span class="comment"> dictionary is most useful when the data to be compressed is short and can be</span></div>
|
|
<div class="line"><a name="l00592"></a><span class="lineno"> 592</span> <span class="comment"> predicted with good accuracy; the data can then be compressed better than</span></div>
|
|
<div class="line"><a name="l00593"></a><span class="lineno"> 593</span> <span class="comment"> with the default empty dictionary.</span></div>
|
|
<div class="line"><a name="l00594"></a><span class="lineno"> 594</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00595"></a><span class="lineno"> 595</span> <span class="comment"> Depending on the size of the compression data structures selected by</span></div>
|
|
<div class="line"><a name="l00596"></a><span class="lineno"> 596</span> <span class="comment"> deflateInit or deflateInit2, a part of the dictionary may in effect be</span></div>
|
|
<div class="line"><a name="l00597"></a><span class="lineno"> 597</span> <span class="comment"> discarded, for example if the dictionary is larger than the window size</span></div>
|
|
<div class="line"><a name="l00598"></a><span class="lineno"> 598</span> <span class="comment"> provided in deflateInit or deflateInit2. Thus the strings most likely to be</span></div>
|
|
<div class="line"><a name="l00599"></a><span class="lineno"> 599</span> <span class="comment"> useful should be put at the end of the dictionary, not at the front. In</span></div>
|
|
<div class="line"><a name="l00600"></a><span class="lineno"> 600</span> <span class="comment"> addition, the current implementation of deflate will use at most the window</span></div>
|
|
<div class="line"><a name="l00601"></a><span class="lineno"> 601</span> <span class="comment"> size minus 262 bytes of the provided dictionary.</span></div>
|
|
<div class="line"><a name="l00602"></a><span class="lineno"> 602</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00603"></a><span class="lineno"> 603</span> <span class="comment"> Upon return of this function, strm->adler is set to the adler32 value</span></div>
|
|
<div class="line"><a name="l00604"></a><span class="lineno"> 604</span> <span class="comment"> of the dictionary; the decompressor may later use this value to determine</span></div>
|
|
<div class="line"><a name="l00605"></a><span class="lineno"> 605</span> <span class="comment"> which dictionary has been used by the compressor. (The adler32 value</span></div>
|
|
<div class="line"><a name="l00606"></a><span class="lineno"> 606</span> <span class="comment"> applies to the whole dictionary even if only a subset of the dictionary is</span></div>
|
|
<div class="line"><a name="l00607"></a><span class="lineno"> 607</span> <span class="comment"> actually used by the compressor.) If a raw deflate was requested, then the</span></div>
|
|
<div class="line"><a name="l00608"></a><span class="lineno"> 608</span> <span class="comment"> adler32 value is not computed and strm->adler is not set.</span></div>
|
|
<div class="line"><a name="l00609"></a><span class="lineno"> 609</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00610"></a><span class="lineno"> 610</span> <span class="comment"> deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a</span></div>
|
|
<div class="line"><a name="l00611"></a><span class="lineno"> 611</span> <span class="comment"> parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is</span></div>
|
|
<div class="line"><a name="l00612"></a><span class="lineno"> 612</span> <span class="comment"> inconsistent (for example if deflate has already been called for this stream</span></div>
|
|
<div class="line"><a name="l00613"></a><span class="lineno"> 613</span> <span class="comment"> or if the compression method is bsort). deflateSetDictionary does not</span></div>
|
|
<div class="line"><a name="l00614"></a><span class="lineno"> 614</span> <span class="comment"> perform any compression: this will be done by deflate().</span></div>
|
|
<div class="line"><a name="l00615"></a><span class="lineno"> 615</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00616"></a><span class="lineno"> 616</span>  </div>
|
|
<div class="line"><a name="l00617"></a><span class="lineno"> 617</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflateCopy <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> dest,</div>
|
|
<div class="line"><a name="l00618"></a><span class="lineno"> 618</span>  <a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> source));</div>
|
|
<div class="line"><a name="l00619"></a><span class="lineno"> 619</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00620"></a><span class="lineno"> 620</span> <span class="comment"> Sets the destination stream as a complete copy of the source stream.</span></div>
|
|
<div class="line"><a name="l00621"></a><span class="lineno"> 621</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00622"></a><span class="lineno"> 622</span> <span class="comment"> This function can be useful when several compression strategies will be</span></div>
|
|
<div class="line"><a name="l00623"></a><span class="lineno"> 623</span> <span class="comment"> tried, for example when there are several ways of pre-processing the input</span></div>
|
|
<div class="line"><a name="l00624"></a><span class="lineno"> 624</span> <span class="comment"> data with a filter. The streams that will be discarded should then be freed</span></div>
|
|
<div class="line"><a name="l00625"></a><span class="lineno"> 625</span> <span class="comment"> by calling deflateEnd. Note that deflateCopy duplicates the internal</span></div>
|
|
<div class="line"><a name="l00626"></a><span class="lineno"> 626</span> <span class="comment"> compression state which can be quite large, so this strategy is slow and can</span></div>
|
|
<div class="line"><a name="l00627"></a><span class="lineno"> 627</span> <span class="comment"> consume lots of memory.</span></div>
|
|
<div class="line"><a name="l00628"></a><span class="lineno"> 628</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00629"></a><span class="lineno"> 629</span> <span class="comment"> deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not</span></div>
|
|
<div class="line"><a name="l00630"></a><span class="lineno"> 630</span> <span class="comment"> enough memory, Z_STREAM_ERROR if the source stream state was inconsistent</span></div>
|
|
<div class="line"><a name="l00631"></a><span class="lineno"> 631</span> <span class="comment"> (such as zalloc being Z_NULL). msg is left unchanged in both source and</span></div>
|
|
<div class="line"><a name="l00632"></a><span class="lineno"> 632</span> <span class="comment"> destination.</span></div>
|
|
<div class="line"><a name="l00633"></a><span class="lineno"> 633</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  </div>
|
|
<div class="line"><a name="l00635"></a><span class="lineno"> 635</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflateReset <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm));</div>
|
|
<div class="line"><a name="l00636"></a><span class="lineno"> 636</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00637"></a><span class="lineno"> 637</span> <span class="comment"> This function is equivalent to deflateEnd followed by deflateInit,</span></div>
|
|
<div class="line"><a name="l00638"></a><span class="lineno"> 638</span> <span class="comment"> but does not free and reallocate all the internal compression state. The</span></div>
|
|
<div class="line"><a name="l00639"></a><span class="lineno"> 639</span> <span class="comment"> stream will keep the same compression level and any other attributes that</span></div>
|
|
<div class="line"><a name="l00640"></a><span class="lineno"> 640</span> <span class="comment"> may have been set by deflateInit2.</span></div>
|
|
<div class="line"><a name="l00641"></a><span class="lineno"> 641</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00642"></a><span class="lineno"> 642</span> <span class="comment"> deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source</span></div>
|
|
<div class="line"><a name="l00643"></a><span class="lineno"> 643</span> <span class="comment"> stream state was inconsistent (such as zalloc or state being Z_NULL).</span></div>
|
|
<div class="line"><a name="l00644"></a><span class="lineno"> 644</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00645"></a><span class="lineno"> 645</span>  </div>
|
|
<div class="line"><a name="l00646"></a><span class="lineno"> 646</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflateParams <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l00647"></a><span class="lineno"> 647</span>  <span class="keywordtype">int</span> level,</div>
|
|
<div class="line"><a name="l00648"></a><span class="lineno"> 648</span>  <span class="keywordtype">int</span> strategy));</div>
|
|
<div class="line"><a name="l00649"></a><span class="lineno"> 649</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00650"></a><span class="lineno"> 650</span> <span class="comment"> Dynamically update the compression level and compression strategy. The</span></div>
|
|
<div class="line"><a name="l00651"></a><span class="lineno"> 651</span> <span class="comment"> interpretation of level and strategy is as in deflateInit2. This can be</span></div>
|
|
<div class="line"><a name="l00652"></a><span class="lineno"> 652</span> <span class="comment"> used to switch between compression and straight copy of the input data, or</span></div>
|
|
<div class="line"><a name="l00653"></a><span class="lineno"> 653</span> <span class="comment"> to switch to a different kind of input data requiring a different strategy.</span></div>
|
|
<div class="line"><a name="l00654"></a><span class="lineno"> 654</span> <span class="comment"> If the compression level is changed, the input available so far is</span></div>
|
|
<div class="line"><a name="l00655"></a><span class="lineno"> 655</span> <span class="comment"> compressed with the old level (and may be flushed); the new level will take</span></div>
|
|
<div class="line"><a name="l00656"></a><span class="lineno"> 656</span> <span class="comment"> effect only at the next call of deflate().</span></div>
|
|
<div class="line"><a name="l00657"></a><span class="lineno"> 657</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00658"></a><span class="lineno"> 658</span> <span class="comment"> Before the call of deflateParams, the stream state must be set as for</span></div>
|
|
<div class="line"><a name="l00659"></a><span class="lineno"> 659</span> <span class="comment"> a call of deflate(), since the currently available input may have to be</span></div>
|
|
<div class="line"><a name="l00660"></a><span class="lineno"> 660</span> <span class="comment"> compressed and flushed. In particular, strm->avail_out must be non-zero.</span></div>
|
|
<div class="line"><a name="l00661"></a><span class="lineno"> 661</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00662"></a><span class="lineno"> 662</span> <span class="comment"> deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source</span></div>
|
|
<div class="line"><a name="l00663"></a><span class="lineno"> 663</span> <span class="comment"> stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if</span></div>
|
|
<div class="line"><a name="l00664"></a><span class="lineno"> 664</span> <span class="comment"> strm->avail_out was zero.</span></div>
|
|
<div class="line"><a name="l00665"></a><span class="lineno"> 665</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00666"></a><span class="lineno"> 666</span>  </div>
|
|
<div class="line"><a name="l00667"></a><span class="lineno"> 667</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflateTune <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l00668"></a><span class="lineno"> 668</span>  <span class="keywordtype">int</span> good_length,</div>
|
|
<div class="line"><a name="l00669"></a><span class="lineno"> 669</span>  <span class="keywordtype">int</span> max_lazy,</div>
|
|
<div class="line"><a name="l00670"></a><span class="lineno"> 670</span>  <span class="keywordtype">int</span> nice_length,</div>
|
|
<div class="line"><a name="l00671"></a><span class="lineno"> 671</span>  <span class="keywordtype">int</span> max_chain));</div>
|
|
<div class="line"><a name="l00672"></a><span class="lineno"> 672</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00673"></a><span class="lineno"> 673</span> <span class="comment"> Fine tune deflate's internal compression parameters. This should only be</span></div>
|
|
<div class="line"><a name="l00674"></a><span class="lineno"> 674</span> <span class="comment"> used by someone who understands the algorithm used by zlib's deflate for</span></div>
|
|
<div class="line"><a name="l00675"></a><span class="lineno"> 675</span> <span class="comment"> searching for the best matching string, and even then only by the most</span></div>
|
|
<div class="line"><a name="l00676"></a><span class="lineno"> 676</span> <span class="comment"> fanatic optimizer trying to squeeze out the last compressed bit for their</span></div>
|
|
<div class="line"><a name="l00677"></a><span class="lineno"> 677</span> <span class="comment"> specific input data. Read the deflate.c source code for the meaning of the</span></div>
|
|
<div class="line"><a name="l00678"></a><span class="lineno"> 678</span> <span class="comment"> max_lazy, good_length, nice_length, and max_chain parameters.</span></div>
|
|
<div class="line"><a name="l00679"></a><span class="lineno"> 679</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00680"></a><span class="lineno"> 680</span> <span class="comment"> deflateTune() can be called after deflateInit() or deflateInit2(), and</span></div>
|
|
<div class="line"><a name="l00681"></a><span class="lineno"> 681</span> <span class="comment"> returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.</span></div>
|
|
<div class="line"><a name="l00682"></a><span class="lineno"> 682</span> <span class="comment"> */</span></div>
|
|
<div class="line"><a name="l00683"></a><span class="lineno"> 683</span>  </div>
|
|
<div class="line"><a name="l00684"></a><span class="lineno"> 684</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflateBound <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l00685"></a><span class="lineno"> 685</span>  <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> sourceLen));</div>
|
|
<div class="line"><a name="l00686"></a><span class="lineno"> 686</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00687"></a><span class="lineno"> 687</span> <span class="comment"> deflateBound() returns an upper bound on the compressed size after</span></div>
|
|
<div class="line"><a name="l00688"></a><span class="lineno"> 688</span> <span class="comment"> deflation of sourceLen bytes. It must be called after deflateInit() or</span></div>
|
|
<div class="line"><a name="l00689"></a><span class="lineno"> 689</span> <span class="comment"> deflateInit2(), and after deflateSetHeader(), if used. This would be used</span></div>
|
|
<div class="line"><a name="l00690"></a><span class="lineno"> 690</span> <span class="comment"> to allocate an output buffer for deflation in a single pass, and so would be</span></div>
|
|
<div class="line"><a name="l00691"></a><span class="lineno"> 691</span> <span class="comment"> called before deflate().</span></div>
|
|
<div class="line"><a name="l00692"></a><span class="lineno"> 692</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00693"></a><span class="lineno"> 693</span>  </div>
|
|
<div class="line"><a name="l00694"></a><span class="lineno"> 694</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflatePrime <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l00695"></a><span class="lineno"> 695</span>  <span class="keywordtype">int</span> bits,</div>
|
|
<div class="line"><a name="l00696"></a><span class="lineno"> 696</span>  <span class="keywordtype">int</span> value));</div>
|
|
<div class="line"><a name="l00697"></a><span class="lineno"> 697</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00698"></a><span class="lineno"> 698</span> <span class="comment"> deflatePrime() inserts bits in the deflate output stream. The intent</span></div>
|
|
<div class="line"><a name="l00699"></a><span class="lineno"> 699</span> <span class="comment"> is that this function is used to start off the deflate output with the bits</span></div>
|
|
<div class="line"><a name="l00700"></a><span class="lineno"> 700</span> <span class="comment"> leftover from a previous deflate stream when appending to it. As such, this</span></div>
|
|
<div class="line"><a name="l00701"></a><span class="lineno"> 701</span> <span class="comment"> function can only be used for raw deflate, and must be used before the first</span></div>
|
|
<div class="line"><a name="l00702"></a><span class="lineno"> 702</span> <span class="comment"> deflate() call after a deflateInit2() or deflateReset(). bits must be less</span></div>
|
|
<div class="line"><a name="l00703"></a><span class="lineno"> 703</span> <span class="comment"> than or equal to 16, and that many of the least significant bits of value</span></div>
|
|
<div class="line"><a name="l00704"></a><span class="lineno"> 704</span> <span class="comment"> will be inserted in the output.</span></div>
|
|
<div class="line"><a name="l00705"></a><span class="lineno"> 705</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00706"></a><span class="lineno"> 706</span> <span class="comment"> deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source</span></div>
|
|
<div class="line"><a name="l00707"></a><span class="lineno"> 707</span> <span class="comment"> stream state was inconsistent.</span></div>
|
|
<div class="line"><a name="l00708"></a><span class="lineno"> 708</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00709"></a><span class="lineno"> 709</span>  </div>
|
|
<div class="line"><a name="l00710"></a><span class="lineno"> 710</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflateSetHeader <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l00711"></a><span class="lineno"> 711</span>  <a class="code" href="zlib_8h.html#a40e9dcc294796d99b25e98fb06477fc8">gz_headerp</a> head));</div>
|
|
<div class="line"><a name="l00712"></a><span class="lineno"> 712</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00713"></a><span class="lineno"> 713</span> <span class="comment"> deflateSetHeader() provides gzip header information for when a gzip</span></div>
|
|
<div class="line"><a name="l00714"></a><span class="lineno"> 714</span> <span class="comment"> stream is requested by deflateInit2(). deflateSetHeader() may be called</span></div>
|
|
<div class="line"><a name="l00715"></a><span class="lineno"> 715</span> <span class="comment"> after deflateInit2() or deflateReset() and before the first call of</span></div>
|
|
<div class="line"><a name="l00716"></a><span class="lineno"> 716</span> <span class="comment"> deflate(). The text, time, os, extra field, name, and comment information</span></div>
|
|
<div class="line"><a name="l00717"></a><span class="lineno"> 717</span> <span class="comment"> in the provided gz_header structure are written to the gzip header (xflag is</span></div>
|
|
<div class="line"><a name="l00718"></a><span class="lineno"> 718</span> <span class="comment"> ignored -- the extra flags are set according to the compression level). The</span></div>
|
|
<div class="line"><a name="l00719"></a><span class="lineno"> 719</span> <span class="comment"> caller must assure that, if not Z_NULL, name and comment are terminated with</span></div>
|
|
<div class="line"><a name="l00720"></a><span class="lineno"> 720</span> <span class="comment"> a zero byte, and that if extra is not Z_NULL, that extra_len bytes are</span></div>
|
|
<div class="line"><a name="l00721"></a><span class="lineno"> 721</span> <span class="comment"> available there. If hcrc is true, a gzip header crc is included. Note that</span></div>
|
|
<div class="line"><a name="l00722"></a><span class="lineno"> 722</span> <span class="comment"> the current versions of the command-line version of gzip (up through version</span></div>
|
|
<div class="line"><a name="l00723"></a><span class="lineno"> 723</span> <span class="comment"> 1.3.x) do not support header crc's, and will report that it is a "multi-part</span></div>
|
|
<div class="line"><a name="l00724"></a><span class="lineno"> 724</span> <span class="comment"> gzip file" and give up.</span></div>
|
|
<div class="line"><a name="l00725"></a><span class="lineno"> 725</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00726"></a><span class="lineno"> 726</span> <span class="comment"> If deflateSetHeader is not used, the default gzip header has text false,</span></div>
|
|
<div class="line"><a name="l00727"></a><span class="lineno"> 727</span> <span class="comment"> the time set to zero, and os set to 255, with no extra, name, or comment</span></div>
|
|
<div class="line"><a name="l00728"></a><span class="lineno"> 728</span> <span class="comment"> fields. The gzip header is returned to the default state by deflateReset().</span></div>
|
|
<div class="line"><a name="l00729"></a><span class="lineno"> 729</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00730"></a><span class="lineno"> 730</span> <span class="comment"> deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source</span></div>
|
|
<div class="line"><a name="l00731"></a><span class="lineno"> 731</span> <span class="comment"> stream state was inconsistent.</span></div>
|
|
<div class="line"><a name="l00732"></a><span class="lineno"> 732</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00733"></a><span class="lineno"> 733</span>  </div>
|
|
<div class="line"><a name="l00734"></a><span class="lineno"> 734</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00735"></a><span class="lineno"> 735</span> <span class="comment">ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,</span></div>
|
|
<div class="line"><a name="l00736"></a><span class="lineno"> 736</span> <span class="comment"> int windowBits));</span></div>
|
|
<div class="line"><a name="l00737"></a><span class="lineno"> 737</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00738"></a><span class="lineno"> 738</span> <span class="comment"> This is another version of inflateInit with an extra parameter. The</span></div>
|
|
<div class="line"><a name="l00739"></a><span class="lineno"> 739</span> <span class="comment"> fields next_in, avail_in, zalloc, zfree and opaque must be initialized</span></div>
|
|
<div class="line"><a name="l00740"></a><span class="lineno"> 740</span> <span class="comment"> before by the caller.</span></div>
|
|
<div class="line"><a name="l00741"></a><span class="lineno"> 741</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00742"></a><span class="lineno"> 742</span> <span class="comment"> The windowBits parameter is the base two logarithm of the maximum window</span></div>
|
|
<div class="line"><a name="l00743"></a><span class="lineno"> 743</span> <span class="comment"> size (the size of the history buffer). It should be in the range 8..15 for</span></div>
|
|
<div class="line"><a name="l00744"></a><span class="lineno"> 744</span> <span class="comment"> this version of the library. The default value is 15 if inflateInit is used</span></div>
|
|
<div class="line"><a name="l00745"></a><span class="lineno"> 745</span> <span class="comment"> instead. windowBits must be greater than or equal to the windowBits value</span></div>
|
|
<div class="line"><a name="l00746"></a><span class="lineno"> 746</span> <span class="comment"> provided to deflateInit2() while compressing, or it must be equal to 15 if</span></div>
|
|
<div class="line"><a name="l00747"></a><span class="lineno"> 747</span> <span class="comment"> deflateInit2() was not used. If a compressed stream with a larger window</span></div>
|
|
<div class="line"><a name="l00748"></a><span class="lineno"> 748</span> <span class="comment"> size is given as input, inflate() will return with the error code</span></div>
|
|
<div class="line"><a name="l00749"></a><span class="lineno"> 749</span> <span class="comment"> Z_DATA_ERROR instead of trying to allocate a larger window.</span></div>
|
|
<div class="line"><a name="l00750"></a><span class="lineno"> 750</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00751"></a><span class="lineno"> 751</span> <span class="comment"> windowBits can also be zero to request that inflate use the window size in</span></div>
|
|
<div class="line"><a name="l00752"></a><span class="lineno"> 752</span> <span class="comment"> the zlib header of the compressed stream.</span></div>
|
|
<div class="line"><a name="l00753"></a><span class="lineno"> 753</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00754"></a><span class="lineno"> 754</span> <span class="comment"> windowBits can also be -8..-15 for raw inflate. In this case, -windowBits</span></div>
|
|
<div class="line"><a name="l00755"></a><span class="lineno"> 755</span> <span class="comment"> determines the window size. inflate() will then process raw deflate data,</span></div>
|
|
<div class="line"><a name="l00756"></a><span class="lineno"> 756</span> <span class="comment"> not looking for a zlib or gzip header, not generating a check value, and not</span></div>
|
|
<div class="line"><a name="l00757"></a><span class="lineno"> 757</span> <span class="comment"> looking for any check values for comparison at the end of the stream. This</span></div>
|
|
<div class="line"><a name="l00758"></a><span class="lineno"> 758</span> <span class="comment"> is for use with other formats that use the deflate compressed data format</span></div>
|
|
<div class="line"><a name="l00759"></a><span class="lineno"> 759</span> <span class="comment"> such as zip. Those formats provide their own check values. If a custom</span></div>
|
|
<div class="line"><a name="l00760"></a><span class="lineno"> 760</span> <span class="comment"> format is developed using the raw deflate format for compressed data, it is</span></div>
|
|
<div class="line"><a name="l00761"></a><span class="lineno"> 761</span> <span class="comment"> recommended that a check value such as an adler32 or a crc32 be applied to</span></div>
|
|
<div class="line"><a name="l00762"></a><span class="lineno"> 762</span> <span class="comment"> the uncompressed data as is done in the zlib, gzip, and zip formats. For</span></div>
|
|
<div class="line"><a name="l00763"></a><span class="lineno"> 763</span> <span class="comment"> most applications, the zlib format should be used as is. Note that comments</span></div>
|
|
<div class="line"><a name="l00764"></a><span class="lineno"> 764</span> <span class="comment"> above on the use in deflateInit2() applies to the magnitude of windowBits.</span></div>
|
|
<div class="line"><a name="l00765"></a><span class="lineno"> 765</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00766"></a><span class="lineno"> 766</span> <span class="comment"> windowBits can also be greater than 15 for optional gzip decoding. Add</span></div>
|
|
<div class="line"><a name="l00767"></a><span class="lineno"> 767</span> <span class="comment"> 32 to windowBits to enable zlib and gzip decoding with automatic header</span></div>
|
|
<div class="line"><a name="l00768"></a><span class="lineno"> 768</span> <span class="comment"> detection, or add 16 to decode only the gzip format (the zlib format will</span></div>
|
|
<div class="line"><a name="l00769"></a><span class="lineno"> 769</span> <span class="comment"> return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a</span></div>
|
|
<div class="line"><a name="l00770"></a><span class="lineno"> 770</span> <span class="comment"> crc32 instead of an adler32.</span></div>
|
|
<div class="line"><a name="l00771"></a><span class="lineno"> 771</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00772"></a><span class="lineno"> 772</span> <span class="comment"> inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough</span></div>
|
|
<div class="line"><a name="l00773"></a><span class="lineno"> 773</span> <span class="comment"> memory, Z_VERSION_ERROR if the zlib library version is incompatible with the</span></div>
|
|
<div class="line"><a name="l00774"></a><span class="lineno"> 774</span> <span class="comment"> version assumed by the caller, or Z_STREAM_ERROR if the parameters are</span></div>
|
|
<div class="line"><a name="l00775"></a><span class="lineno"> 775</span> <span class="comment"> invalid, such as a null pointer to the structure. msg is set to null if</span></div>
|
|
<div class="line"><a name="l00776"></a><span class="lineno"> 776</span> <span class="comment"> there is no error message. inflateInit2 does not perform any decompression</span></div>
|
|
<div class="line"><a name="l00777"></a><span class="lineno"> 777</span> <span class="comment"> apart from possibly reading the zlib header if present: actual decompression</span></div>
|
|
<div class="line"><a name="l00778"></a><span class="lineno"> 778</span> <span class="comment"> will be done by inflate(). (So next_in and avail_in may be modified, but</span></div>
|
|
<div class="line"><a name="l00779"></a><span class="lineno"> 779</span> <span class="comment"> next_out and avail_out are unused and unchanged.) The current implementation</span></div>
|
|
<div class="line"><a name="l00780"></a><span class="lineno"> 780</span> <span class="comment"> of inflateInit2() does not process any header information -- that is</span></div>
|
|
<div class="line"><a name="l00781"></a><span class="lineno"> 781</span> <span class="comment"> deferred until inflate() is called.</span></div>
|
|
<div class="line"><a name="l00782"></a><span class="lineno"> 782</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00783"></a><span class="lineno"> 783</span>  </div>
|
|
<div class="line"><a name="l00784"></a><span class="lineno"> 784</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateSetDictionary <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l00785"></a><span class="lineno"> 785</span>  <span class="keyword">const</span> <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *dictionary,</div>
|
|
<div class="line"><a name="l00786"></a><span class="lineno"> 786</span>  <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> dictLength));</div>
|
|
<div class="line"><a name="l00787"></a><span class="lineno"> 787</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00788"></a><span class="lineno"> 788</span> <span class="comment"> Initializes the decompression dictionary from the given uncompressed byte</span></div>
|
|
<div class="line"><a name="l00789"></a><span class="lineno"> 789</span> <span class="comment"> sequence. This function must be called immediately after a call of inflate,</span></div>
|
|
<div class="line"><a name="l00790"></a><span class="lineno"> 790</span> <span class="comment"> if that call returned Z_NEED_DICT. The dictionary chosen by the compressor</span></div>
|
|
<div class="line"><a name="l00791"></a><span class="lineno"> 791</span> <span class="comment"> can be determined from the adler32 value returned by that call of inflate.</span></div>
|
|
<div class="line"><a name="l00792"></a><span class="lineno"> 792</span> <span class="comment"> The compressor and decompressor must use exactly the same dictionary (see</span></div>
|
|
<div class="line"><a name="l00793"></a><span class="lineno"> 793</span> <span class="comment"> deflateSetDictionary). For raw inflate, this function can be called</span></div>
|
|
<div class="line"><a name="l00794"></a><span class="lineno"> 794</span> <span class="comment"> immediately after inflateInit2() or inflateReset() and before any call of</span></div>
|
|
<div class="line"><a name="l00795"></a><span class="lineno"> 795</span> <span class="comment"> inflate() to set the dictionary. The application must insure that the</span></div>
|
|
<div class="line"><a name="l00796"></a><span class="lineno"> 796</span> <span class="comment"> dictionary that was used for compression is provided.</span></div>
|
|
<div class="line"><a name="l00797"></a><span class="lineno"> 797</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00798"></a><span class="lineno"> 798</span> <span class="comment"> inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a</span></div>
|
|
<div class="line"><a name="l00799"></a><span class="lineno"> 799</span> <span class="comment"> parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is</span></div>
|
|
<div class="line"><a name="l00800"></a><span class="lineno"> 800</span> <span class="comment"> inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the</span></div>
|
|
<div class="line"><a name="l00801"></a><span class="lineno"> 801</span> <span class="comment"> expected one (incorrect adler32 value). inflateSetDictionary does not</span></div>
|
|
<div class="line"><a name="l00802"></a><span class="lineno"> 802</span> <span class="comment"> perform any decompression: this will be done by subsequent calls of</span></div>
|
|
<div class="line"><a name="l00803"></a><span class="lineno"> 803</span> <span class="comment"> inflate().</span></div>
|
|
<div class="line"><a name="l00804"></a><span class="lineno"> 804</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00805"></a><span class="lineno"> 805</span>  </div>
|
|
<div class="line"><a name="l00806"></a><span class="lineno"> 806</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateSync <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm));</div>
|
|
<div class="line"><a name="l00807"></a><span class="lineno"> 807</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00808"></a><span class="lineno"> 808</span> <span class="comment"> Skips invalid compressed data until a full flush point (see above the</span></div>
|
|
<div class="line"><a name="l00809"></a><span class="lineno"> 809</span> <span class="comment"> description of deflate with Z_FULL_FLUSH) can be found, or until all</span></div>
|
|
<div class="line"><a name="l00810"></a><span class="lineno"> 810</span> <span class="comment"> available input is skipped. No output is provided.</span></div>
|
|
<div class="line"><a name="l00811"></a><span class="lineno"> 811</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00812"></a><span class="lineno"> 812</span> <span class="comment"> inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR</span></div>
|
|
<div class="line"><a name="l00813"></a><span class="lineno"> 813</span> <span class="comment"> if no more input was provided, Z_DATA_ERROR if no flush point has been</span></div>
|
|
<div class="line"><a name="l00814"></a><span class="lineno"> 814</span> <span class="comment"> found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the</span></div>
|
|
<div class="line"><a name="l00815"></a><span class="lineno"> 815</span> <span class="comment"> success case, the application may save the current current value of total_in</span></div>
|
|
<div class="line"><a name="l00816"></a><span class="lineno"> 816</span> <span class="comment"> which indicates where valid compressed data was found. In the error case,</span></div>
|
|
<div class="line"><a name="l00817"></a><span class="lineno"> 817</span> <span class="comment"> the application may repeatedly call inflateSync, providing more input each</span></div>
|
|
<div class="line"><a name="l00818"></a><span class="lineno"> 818</span> <span class="comment"> time, until success or end of the input data.</span></div>
|
|
<div class="line"><a name="l00819"></a><span class="lineno"> 819</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00820"></a><span class="lineno"> 820</span>  </div>
|
|
<div class="line"><a name="l00821"></a><span class="lineno"> 821</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateCopy <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> dest,</div>
|
|
<div class="line"><a name="l00822"></a><span class="lineno"> 822</span>  <a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> source));</div>
|
|
<div class="line"><a name="l00823"></a><span class="lineno"> 823</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00824"></a><span class="lineno"> 824</span> <span class="comment"> Sets the destination stream as a complete copy of the source stream.</span></div>
|
|
<div class="line"><a name="l00825"></a><span class="lineno"> 825</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00826"></a><span class="lineno"> 826</span> <span class="comment"> This function can be useful when randomly accessing a large stream. The</span></div>
|
|
<div class="line"><a name="l00827"></a><span class="lineno"> 827</span> <span class="comment"> first pass through the stream can periodically record the inflate state,</span></div>
|
|
<div class="line"><a name="l00828"></a><span class="lineno"> 828</span> <span class="comment"> allowing restarting inflate at those points when randomly accessing the</span></div>
|
|
<div class="line"><a name="l00829"></a><span class="lineno"> 829</span> <span class="comment"> stream.</span></div>
|
|
<div class="line"><a name="l00830"></a><span class="lineno"> 830</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00831"></a><span class="lineno"> 831</span> <span class="comment"> inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not</span></div>
|
|
<div class="line"><a name="l00832"></a><span class="lineno"> 832</span> <span class="comment"> enough memory, Z_STREAM_ERROR if the source stream state was inconsistent</span></div>
|
|
<div class="line"><a name="l00833"></a><span class="lineno"> 833</span> <span class="comment"> (such as zalloc being Z_NULL). msg is left unchanged in both source and</span></div>
|
|
<div class="line"><a name="l00834"></a><span class="lineno"> 834</span> <span class="comment"> destination.</span></div>
|
|
<div class="line"><a name="l00835"></a><span class="lineno"> 835</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00836"></a><span class="lineno"> 836</span>  </div>
|
|
<div class="line"><a name="l00837"></a><span class="lineno"> 837</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateReset <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm));</div>
|
|
<div class="line"><a name="l00838"></a><span class="lineno"> 838</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00839"></a><span class="lineno"> 839</span> <span class="comment"> This function is equivalent to inflateEnd followed by inflateInit,</span></div>
|
|
<div class="line"><a name="l00840"></a><span class="lineno"> 840</span> <span class="comment"> but does not free and reallocate all the internal decompression state. The</span></div>
|
|
<div class="line"><a name="l00841"></a><span class="lineno"> 841</span> <span class="comment"> stream will keep attributes that may have been set by inflateInit2.</span></div>
|
|
<div class="line"><a name="l00842"></a><span class="lineno"> 842</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00843"></a><span class="lineno"> 843</span> <span class="comment"> inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source</span></div>
|
|
<div class="line"><a name="l00844"></a><span class="lineno"> 844</span> <span class="comment"> stream state was inconsistent (such as zalloc or state being Z_NULL).</span></div>
|
|
<div class="line"><a name="l00845"></a><span class="lineno"> 845</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00846"></a><span class="lineno"> 846</span>  </div>
|
|
<div class="line"><a name="l00847"></a><span class="lineno"> 847</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateReset2 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l00848"></a><span class="lineno"> 848</span>  <span class="keywordtype">int</span> windowBits));</div>
|
|
<div class="line"><a name="l00849"></a><span class="lineno"> 849</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00850"></a><span class="lineno"> 850</span> <span class="comment"> This function is the same as inflateReset, but it also permits changing</span></div>
|
|
<div class="line"><a name="l00851"></a><span class="lineno"> 851</span> <span class="comment"> the wrap and window size requests. The windowBits parameter is interpreted</span></div>
|
|
<div class="line"><a name="l00852"></a><span class="lineno"> 852</span> <span class="comment"> the same as it is for inflateInit2.</span></div>
|
|
<div class="line"><a name="l00853"></a><span class="lineno"> 853</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00854"></a><span class="lineno"> 854</span> <span class="comment"> inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source</span></div>
|
|
<div class="line"><a name="l00855"></a><span class="lineno"> 855</span> <span class="comment"> stream state was inconsistent (such as zalloc or state being Z_NULL), or if</span></div>
|
|
<div class="line"><a name="l00856"></a><span class="lineno"> 856</span> <span class="comment"> the windowBits parameter is invalid.</span></div>
|
|
<div class="line"><a name="l00857"></a><span class="lineno"> 857</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00858"></a><span class="lineno"> 858</span>  </div>
|
|
<div class="line"><a name="l00859"></a><span class="lineno"> 859</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflatePrime <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l00860"></a><span class="lineno"> 860</span>  <span class="keywordtype">int</span> bits,</div>
|
|
<div class="line"><a name="l00861"></a><span class="lineno"> 861</span>  <span class="keywordtype">int</span> value));</div>
|
|
<div class="line"><a name="l00862"></a><span class="lineno"> 862</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00863"></a><span class="lineno"> 863</span> <span class="comment"> This function inserts bits in the inflate input stream. The intent is</span></div>
|
|
<div class="line"><a name="l00864"></a><span class="lineno"> 864</span> <span class="comment"> that this function is used to start inflating at a bit position in the</span></div>
|
|
<div class="line"><a name="l00865"></a><span class="lineno"> 865</span> <span class="comment"> middle of a byte. The provided bits will be used before any bytes are used</span></div>
|
|
<div class="line"><a name="l00866"></a><span class="lineno"> 866</span> <span class="comment"> from next_in. This function should only be used with raw inflate, and</span></div>
|
|
<div class="line"><a name="l00867"></a><span class="lineno"> 867</span> <span class="comment"> should be used before the first inflate() call after inflateInit2() or</span></div>
|
|
<div class="line"><a name="l00868"></a><span class="lineno"> 868</span> <span class="comment"> inflateReset(). bits must be less than or equal to 16, and that many of the</span></div>
|
|
<div class="line"><a name="l00869"></a><span class="lineno"> 869</span> <span class="comment"> least significant bits of value will be inserted in the input.</span></div>
|
|
<div class="line"><a name="l00870"></a><span class="lineno"> 870</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00871"></a><span class="lineno"> 871</span> <span class="comment"> If bits is negative, then the input stream bit buffer is emptied. Then</span></div>
|
|
<div class="line"><a name="l00872"></a><span class="lineno"> 872</span> <span class="comment"> inflatePrime() can be called again to put bits in the buffer. This is used</span></div>
|
|
<div class="line"><a name="l00873"></a><span class="lineno"> 873</span> <span class="comment"> to clear out bits leftover after feeding inflate a block description prior</span></div>
|
|
<div class="line"><a name="l00874"></a><span class="lineno"> 874</span> <span class="comment"> to feeding inflate codes.</span></div>
|
|
<div class="line"><a name="l00875"></a><span class="lineno"> 875</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00876"></a><span class="lineno"> 876</span> <span class="comment"> inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source</span></div>
|
|
<div class="line"><a name="l00877"></a><span class="lineno"> 877</span> <span class="comment"> stream state was inconsistent.</span></div>
|
|
<div class="line"><a name="l00878"></a><span class="lineno"> 878</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00879"></a><span class="lineno"> 879</span>  </div>
|
|
<div class="line"><a name="l00880"></a><span class="lineno"> 880</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">long</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateMark <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm));</div>
|
|
<div class="line"><a name="l00881"></a><span class="lineno"> 881</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00882"></a><span class="lineno"> 882</span> <span class="comment"> This function returns two values, one in the lower 16 bits of the return</span></div>
|
|
<div class="line"><a name="l00883"></a><span class="lineno"> 883</span> <span class="comment"> value, and the other in the remaining upper bits, obtained by shifting the</span></div>
|
|
<div class="line"><a name="l00884"></a><span class="lineno"> 884</span> <span class="comment"> return value down 16 bits. If the upper value is -1 and the lower value is</span></div>
|
|
<div class="line"><a name="l00885"></a><span class="lineno"> 885</span> <span class="comment"> zero, then inflate() is currently decoding information outside of a block.</span></div>
|
|
<div class="line"><a name="l00886"></a><span class="lineno"> 886</span> <span class="comment"> If the upper value is -1 and the lower value is non-zero, then inflate is in</span></div>
|
|
<div class="line"><a name="l00887"></a><span class="lineno"> 887</span> <span class="comment"> the middle of a stored block, with the lower value equaling the number of</span></div>
|
|
<div class="line"><a name="l00888"></a><span class="lineno"> 888</span> <span class="comment"> bytes from the input remaining to copy. If the upper value is not -1, then</span></div>
|
|
<div class="line"><a name="l00889"></a><span class="lineno"> 889</span> <span class="comment"> it is the number of bits back from the current bit position in the input of</span></div>
|
|
<div class="line"><a name="l00890"></a><span class="lineno"> 890</span> <span class="comment"> the code (literal or length/distance pair) currently being processed. In</span></div>
|
|
<div class="line"><a name="l00891"></a><span class="lineno"> 891</span> <span class="comment"> that case the lower value is the number of bytes already emitted for that</span></div>
|
|
<div class="line"><a name="l00892"></a><span class="lineno"> 892</span> <span class="comment"> code.</span></div>
|
|
<div class="line"><a name="l00893"></a><span class="lineno"> 893</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00894"></a><span class="lineno"> 894</span> <span class="comment"> A code is being processed if inflate is waiting for more input to complete</span></div>
|
|
<div class="line"><a name="l00895"></a><span class="lineno"> 895</span> <span class="comment"> decoding of the code, or if it has completed decoding but is waiting for</span></div>
|
|
<div class="line"><a name="l00896"></a><span class="lineno"> 896</span> <span class="comment"> more output space to write the literal or match data.</span></div>
|
|
<div class="line"><a name="l00897"></a><span class="lineno"> 897</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00898"></a><span class="lineno"> 898</span> <span class="comment"> inflateMark() is used to mark locations in the input data for random</span></div>
|
|
<div class="line"><a name="l00899"></a><span class="lineno"> 899</span> <span class="comment"> access, which may be at bit positions, and to note those cases where the</span></div>
|
|
<div class="line"><a name="l00900"></a><span class="lineno"> 900</span> <span class="comment"> output of a code may span boundaries of random access blocks. The current</span></div>
|
|
<div class="line"><a name="l00901"></a><span class="lineno"> 901</span> <span class="comment"> location in the input stream can be determined from avail_in and data_type</span></div>
|
|
<div class="line"><a name="l00902"></a><span class="lineno"> 902</span> <span class="comment"> as noted in the description for the Z_BLOCK flush parameter for inflate.</span></div>
|
|
<div class="line"><a name="l00903"></a><span class="lineno"> 903</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00904"></a><span class="lineno"> 904</span> <span class="comment"> inflateMark returns the value noted above or -1 << 16 if the provided</span></div>
|
|
<div class="line"><a name="l00905"></a><span class="lineno"> 905</span> <span class="comment"> source stream state was inconsistent.</span></div>
|
|
<div class="line"><a name="l00906"></a><span class="lineno"> 906</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00907"></a><span class="lineno"> 907</span>  </div>
|
|
<div class="line"><a name="l00908"></a><span class="lineno"> 908</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateGetHeader <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l00909"></a><span class="lineno"> 909</span>  <a class="code" href="zlib_8h.html#a40e9dcc294796d99b25e98fb06477fc8">gz_headerp</a> head));</div>
|
|
<div class="line"><a name="l00910"></a><span class="lineno"> 910</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00911"></a><span class="lineno"> 911</span> <span class="comment"> inflateGetHeader() requests that gzip header information be stored in the</span></div>
|
|
<div class="line"><a name="l00912"></a><span class="lineno"> 912</span> <span class="comment"> provided gz_header structure. inflateGetHeader() may be called after</span></div>
|
|
<div class="line"><a name="l00913"></a><span class="lineno"> 913</span> <span class="comment"> inflateInit2() or inflateReset(), and before the first call of inflate().</span></div>
|
|
<div class="line"><a name="l00914"></a><span class="lineno"> 914</span> <span class="comment"> As inflate() processes the gzip stream, head->done is zero until the header</span></div>
|
|
<div class="line"><a name="l00915"></a><span class="lineno"> 915</span> <span class="comment"> is completed, at which time head->done is set to one. If a zlib stream is</span></div>
|
|
<div class="line"><a name="l00916"></a><span class="lineno"> 916</span> <span class="comment"> being decoded, then head->done is set to -1 to indicate that there will be</span></div>
|
|
<div class="line"><a name="l00917"></a><span class="lineno"> 917</span> <span class="comment"> no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be</span></div>
|
|
<div class="line"><a name="l00918"></a><span class="lineno"> 918</span> <span class="comment"> used to force inflate() to return immediately after header processing is</span></div>
|
|
<div class="line"><a name="l00919"></a><span class="lineno"> 919</span> <span class="comment"> complete and before any actual data is decompressed.</span></div>
|
|
<div class="line"><a name="l00920"></a><span class="lineno"> 920</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00921"></a><span class="lineno"> 921</span> <span class="comment"> The text, time, xflags, and os fields are filled in with the gzip header</span></div>
|
|
<div class="line"><a name="l00922"></a><span class="lineno"> 922</span> <span class="comment"> contents. hcrc is set to true if there is a header CRC. (The header CRC</span></div>
|
|
<div class="line"><a name="l00923"></a><span class="lineno"> 923</span> <span class="comment"> was valid if done is set to one.) If extra is not Z_NULL, then extra_max</span></div>
|
|
<div class="line"><a name="l00924"></a><span class="lineno"> 924</span> <span class="comment"> contains the maximum number of bytes to write to extra. Once done is true,</span></div>
|
|
<div class="line"><a name="l00925"></a><span class="lineno"> 925</span> <span class="comment"> extra_len contains the actual extra field length, and extra contains the</span></div>
|
|
<div class="line"><a name="l00926"></a><span class="lineno"> 926</span> <span class="comment"> extra field, or that field truncated if extra_max is less than extra_len.</span></div>
|
|
<div class="line"><a name="l00927"></a><span class="lineno"> 927</span> <span class="comment"> If name is not Z_NULL, then up to name_max characters are written there,</span></div>
|
|
<div class="line"><a name="l00928"></a><span class="lineno"> 928</span> <span class="comment"> terminated with a zero unless the length is greater than name_max. If</span></div>
|
|
<div class="line"><a name="l00929"></a><span class="lineno"> 929</span> <span class="comment"> comment is not Z_NULL, then up to comm_max characters are written there,</span></div>
|
|
<div class="line"><a name="l00930"></a><span class="lineno"> 930</span> <span class="comment"> terminated with a zero unless the length is greater than comm_max. When any</span></div>
|
|
<div class="line"><a name="l00931"></a><span class="lineno"> 931</span> <span class="comment"> of extra, name, or comment are not Z_NULL and the respective field is not</span></div>
|
|
<div class="line"><a name="l00932"></a><span class="lineno"> 932</span> <span class="comment"> present in the header, then that field is set to Z_NULL to signal its</span></div>
|
|
<div class="line"><a name="l00933"></a><span class="lineno"> 933</span> <span class="comment"> absence. This allows the use of deflateSetHeader() with the returned</span></div>
|
|
<div class="line"><a name="l00934"></a><span class="lineno"> 934</span> <span class="comment"> structure to duplicate the header. However if those fields are set to</span></div>
|
|
<div class="line"><a name="l00935"></a><span class="lineno"> 935</span> <span class="comment"> allocated memory, then the application will need to save those pointers</span></div>
|
|
<div class="line"><a name="l00936"></a><span class="lineno"> 936</span> <span class="comment"> elsewhere so that they can be eventually freed.</span></div>
|
|
<div class="line"><a name="l00937"></a><span class="lineno"> 937</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00938"></a><span class="lineno"> 938</span> <span class="comment"> If inflateGetHeader is not used, then the header information is simply</span></div>
|
|
<div class="line"><a name="l00939"></a><span class="lineno"> 939</span> <span class="comment"> discarded. The header is always checked for validity, including the header</span></div>
|
|
<div class="line"><a name="l00940"></a><span class="lineno"> 940</span> <span class="comment"> CRC if present. inflateReset() will reset the process to discard the header</span></div>
|
|
<div class="line"><a name="l00941"></a><span class="lineno"> 941</span> <span class="comment"> information. The application would need to call inflateGetHeader() again to</span></div>
|
|
<div class="line"><a name="l00942"></a><span class="lineno"> 942</span> <span class="comment"> retrieve the header from the next gzip stream.</span></div>
|
|
<div class="line"><a name="l00943"></a><span class="lineno"> 943</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00944"></a><span class="lineno"> 944</span> <span class="comment"> inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source</span></div>
|
|
<div class="line"><a name="l00945"></a><span class="lineno"> 945</span> <span class="comment"> stream state was inconsistent.</span></div>
|
|
<div class="line"><a name="l00946"></a><span class="lineno"> 946</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00947"></a><span class="lineno"> 947</span>  </div>
|
|
<div class="line"><a name="l00948"></a><span class="lineno"> 948</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00949"></a><span class="lineno"> 949</span> <span class="comment">ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,</span></div>
|
|
<div class="line"><a name="l00950"></a><span class="lineno"> 950</span> <span class="comment"> unsigned char FAR *window));</span></div>
|
|
<div class="line"><a name="l00951"></a><span class="lineno"> 951</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00952"></a><span class="lineno"> 952</span> <span class="comment"> Initialize the internal stream state for decompression using inflateBack()</span></div>
|
|
<div class="line"><a name="l00953"></a><span class="lineno"> 953</span> <span class="comment"> calls. The fields zalloc, zfree and opaque in strm must be initialized</span></div>
|
|
<div class="line"><a name="l00954"></a><span class="lineno"> 954</span> <span class="comment"> before the call. If zalloc and zfree are Z_NULL, then the default library-</span></div>
|
|
<div class="line"><a name="l00955"></a><span class="lineno"> 955</span> <span class="comment"> derived memory allocation routines are used. windowBits is the base two</span></div>
|
|
<div class="line"><a name="l00956"></a><span class="lineno"> 956</span> <span class="comment"> logarithm of the window size, in the range 8..15. window is a caller</span></div>
|
|
<div class="line"><a name="l00957"></a><span class="lineno"> 957</span> <span class="comment"> supplied buffer of that size. Except for special applications where it is</span></div>
|
|
<div class="line"><a name="l00958"></a><span class="lineno"> 958</span> <span class="comment"> assured that deflate was used with small window sizes, windowBits must be 15</span></div>
|
|
<div class="line"><a name="l00959"></a><span class="lineno"> 959</span> <span class="comment"> and a 32K byte window must be supplied to be able to decompress general</span></div>
|
|
<div class="line"><a name="l00960"></a><span class="lineno"> 960</span> <span class="comment"> deflate streams.</span></div>
|
|
<div class="line"><a name="l00961"></a><span class="lineno"> 961</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00962"></a><span class="lineno"> 962</span> <span class="comment"> See inflateBack() for the usage of these routines.</span></div>
|
|
<div class="line"><a name="l00963"></a><span class="lineno"> 963</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00964"></a><span class="lineno"> 964</span> <span class="comment"> inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of</span></div>
|
|
<div class="line"><a name="l00965"></a><span class="lineno"> 965</span> <span class="comment"> the paramaters are invalid, Z_MEM_ERROR if the internal state could not be</span></div>
|
|
<div class="line"><a name="l00966"></a><span class="lineno"> 966</span> <span class="comment"> allocated, or Z_VERSION_ERROR if the version of the library does not match</span></div>
|
|
<div class="line"><a name="l00967"></a><span class="lineno"> 967</span> <span class="comment"> the version of the header file.</span></div>
|
|
<div class="line"><a name="l00968"></a><span class="lineno"> 968</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00969"></a><span class="lineno"> 969</span>  </div>
|
|
<div class="line"><a name="l00970"></a><span class="lineno"> 970</span> <span class="keyword">typedef</span> unsigned (*in_func) <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<span class="keywordtype">void</span> <a class="code" href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a> * <a class="code" href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a> *));</div>
|
|
<div class="line"><a name="l00971"></a><span class="lineno"> 971</span> <span class="keyword">typedef</span> int (*out_func) <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<span class="keywordtype">void</span> <a class="code" href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a> *, <span class="keywordtype">unsigned</span>));</div>
|
|
<div class="line"><a name="l00972"></a><span class="lineno"> 972</span>  </div>
|
|
<div class="line"><a name="l00973"></a><span class="lineno"> 973</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateBack <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l00974"></a><span class="lineno"> 974</span>  in_func in, <span class="keywordtype">void</span> <a class="code" href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a> *in_desc,</div>
|
|
<div class="line"><a name="l00975"></a><span class="lineno"> 975</span>  out_func out, <span class="keywordtype">void</span> <a class="code" href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a> *out_desc));</div>
|
|
<div class="line"><a name="l00976"></a><span class="lineno"> 976</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00977"></a><span class="lineno"> 977</span> <span class="comment"> inflateBack() does a raw inflate with a single call using a call-back</span></div>
|
|
<div class="line"><a name="l00978"></a><span class="lineno"> 978</span> <span class="comment"> interface for input and output. This is more efficient than inflate() for</span></div>
|
|
<div class="line"><a name="l00979"></a><span class="lineno"> 979</span> <span class="comment"> file i/o applications in that it avoids copying between the output and the</span></div>
|
|
<div class="line"><a name="l00980"></a><span class="lineno"> 980</span> <span class="comment"> sliding window by simply making the window itself the output buffer. This</span></div>
|
|
<div class="line"><a name="l00981"></a><span class="lineno"> 981</span> <span class="comment"> function trusts the application to not change the output buffer passed by</span></div>
|
|
<div class="line"><a name="l00982"></a><span class="lineno"> 982</span> <span class="comment"> the output function, at least until inflateBack() returns.</span></div>
|
|
<div class="line"><a name="l00983"></a><span class="lineno"> 983</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00984"></a><span class="lineno"> 984</span> <span class="comment"> inflateBackInit() must be called first to allocate the internal state</span></div>
|
|
<div class="line"><a name="l00985"></a><span class="lineno"> 985</span> <span class="comment"> and to initialize the state with the user-provided window buffer.</span></div>
|
|
<div class="line"><a name="l00986"></a><span class="lineno"> 986</span> <span class="comment"> inflateBack() may then be used multiple times to inflate a complete, raw</span></div>
|
|
<div class="line"><a name="l00987"></a><span class="lineno"> 987</span> <span class="comment"> deflate stream with each call. inflateBackEnd() is then called to free the</span></div>
|
|
<div class="line"><a name="l00988"></a><span class="lineno"> 988</span> <span class="comment"> allocated state.</span></div>
|
|
<div class="line"><a name="l00989"></a><span class="lineno"> 989</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00990"></a><span class="lineno"> 990</span> <span class="comment"> A raw deflate stream is one with no zlib or gzip header or trailer.</span></div>
|
|
<div class="line"><a name="l00991"></a><span class="lineno"> 991</span> <span class="comment"> This routine would normally be used in a utility that reads zip or gzip</span></div>
|
|
<div class="line"><a name="l00992"></a><span class="lineno"> 992</span> <span class="comment"> files and writes out uncompressed files. The utility would decode the</span></div>
|
|
<div class="line"><a name="l00993"></a><span class="lineno"> 993</span> <span class="comment"> header and process the trailer on its own, hence this routine expects only</span></div>
|
|
<div class="line"><a name="l00994"></a><span class="lineno"> 994</span> <span class="comment"> the raw deflate stream to decompress. This is different from the normal</span></div>
|
|
<div class="line"><a name="l00995"></a><span class="lineno"> 995</span> <span class="comment"> behavior of inflate(), which expects either a zlib or gzip header and</span></div>
|
|
<div class="line"><a name="l00996"></a><span class="lineno"> 996</span> <span class="comment"> trailer around the deflate stream.</span></div>
|
|
<div class="line"><a name="l00997"></a><span class="lineno"> 997</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00998"></a><span class="lineno"> 998</span> <span class="comment"> inflateBack() uses two subroutines supplied by the caller that are then</span></div>
|
|
<div class="line"><a name="l00999"></a><span class="lineno"> 999</span> <span class="comment"> called by inflateBack() for input and output. inflateBack() calls those</span></div>
|
|
<div class="line"><a name="l01000"></a><span class="lineno"> 1000</span> <span class="comment"> routines until it reads a complete deflate stream and writes out all of the</span></div>
|
|
<div class="line"><a name="l01001"></a><span class="lineno"> 1001</span> <span class="comment"> uncompressed data, or until it encounters an error. The function's</span></div>
|
|
<div class="line"><a name="l01002"></a><span class="lineno"> 1002</span> <span class="comment"> parameters and return types are defined above in the in_func and out_func</span></div>
|
|
<div class="line"><a name="l01003"></a><span class="lineno"> 1003</span> <span class="comment"> typedefs. inflateBack() will call in(in_desc, &buf) which should return the</span></div>
|
|
<div class="line"><a name="l01004"></a><span class="lineno"> 1004</span> <span class="comment"> number of bytes of provided input, and a pointer to that input in buf. If</span></div>
|
|
<div class="line"><a name="l01005"></a><span class="lineno"> 1005</span> <span class="comment"> there is no input available, in() must return zero--buf is ignored in that</span></div>
|
|
<div class="line"><a name="l01006"></a><span class="lineno"> 1006</span> <span class="comment"> case--and inflateBack() will return a buffer error. inflateBack() will call</span></div>
|
|
<div class="line"><a name="l01007"></a><span class="lineno"> 1007</span> <span class="comment"> out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()</span></div>
|
|
<div class="line"><a name="l01008"></a><span class="lineno"> 1008</span> <span class="comment"> should return zero on success, or non-zero on failure. If out() returns</span></div>
|
|
<div class="line"><a name="l01009"></a><span class="lineno"> 1009</span> <span class="comment"> non-zero, inflateBack() will return with an error. Neither in() nor out()</span></div>
|
|
<div class="line"><a name="l01010"></a><span class="lineno"> 1010</span> <span class="comment"> are permitted to change the contents of the window provided to</span></div>
|
|
<div class="line"><a name="l01011"></a><span class="lineno"> 1011</span> <span class="comment"> inflateBackInit(), which is also the buffer that out() uses to write from.</span></div>
|
|
<div class="line"><a name="l01012"></a><span class="lineno"> 1012</span> <span class="comment"> The length written by out() will be at most the window size. Any non-zero</span></div>
|
|
<div class="line"><a name="l01013"></a><span class="lineno"> 1013</span> <span class="comment"> amount of input may be provided by in().</span></div>
|
|
<div class="line"><a name="l01014"></a><span class="lineno"> 1014</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01015"></a><span class="lineno"> 1015</span> <span class="comment"> For convenience, inflateBack() can be provided input on the first call by</span></div>
|
|
<div class="line"><a name="l01016"></a><span class="lineno"> 1016</span> <span class="comment"> setting strm->next_in and strm->avail_in. If that input is exhausted, then</span></div>
|
|
<div class="line"><a name="l01017"></a><span class="lineno"> 1017</span> <span class="comment"> in() will be called. Therefore strm->next_in must be initialized before</span></div>
|
|
<div class="line"><a name="l01018"></a><span class="lineno"> 1018</span> <span class="comment"> calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called</span></div>
|
|
<div class="line"><a name="l01019"></a><span class="lineno"> 1019</span> <span class="comment"> immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in</span></div>
|
|
<div class="line"><a name="l01020"></a><span class="lineno"> 1020</span> <span class="comment"> must also be initialized, and then if strm->avail_in is not zero, input will</span></div>
|
|
<div class="line"><a name="l01021"></a><span class="lineno"> 1021</span> <span class="comment"> initially be taken from strm->next_in[0 .. strm->avail_in - 1].</span></div>
|
|
<div class="line"><a name="l01022"></a><span class="lineno"> 1022</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01023"></a><span class="lineno"> 1023</span> <span class="comment"> The in_desc and out_desc parameters of inflateBack() is passed as the</span></div>
|
|
<div class="line"><a name="l01024"></a><span class="lineno"> 1024</span> <span class="comment"> first parameter of in() and out() respectively when they are called. These</span></div>
|
|
<div class="line"><a name="l01025"></a><span class="lineno"> 1025</span> <span class="comment"> descriptors can be optionally used to pass any information that the caller-</span></div>
|
|
<div class="line"><a name="l01026"></a><span class="lineno"> 1026</span> <span class="comment"> supplied in() and out() functions need to do their job.</span></div>
|
|
<div class="line"><a name="l01027"></a><span class="lineno"> 1027</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01028"></a><span class="lineno"> 1028</span> <span class="comment"> On return, inflateBack() will set strm->next_in and strm->avail_in to</span></div>
|
|
<div class="line"><a name="l01029"></a><span class="lineno"> 1029</span> <span class="comment"> pass back any unused input that was provided by the last in() call. The</span></div>
|
|
<div class="line"><a name="l01030"></a><span class="lineno"> 1030</span> <span class="comment"> return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR</span></div>
|
|
<div class="line"><a name="l01031"></a><span class="lineno"> 1031</span> <span class="comment"> if in() or out() returned an error, Z_DATA_ERROR if there was a format error</span></div>
|
|
<div class="line"><a name="l01032"></a><span class="lineno"> 1032</span> <span class="comment"> in the deflate stream (in which case strm->msg is set to indicate the nature</span></div>
|
|
<div class="line"><a name="l01033"></a><span class="lineno"> 1033</span> <span class="comment"> of the error), or Z_STREAM_ERROR if the stream was not properly initialized.</span></div>
|
|
<div class="line"><a name="l01034"></a><span class="lineno"> 1034</span> <span class="comment"> In the case of Z_BUF_ERROR, an input or output error can be distinguished</span></div>
|
|
<div class="line"><a name="l01035"></a><span class="lineno"> 1035</span> <span class="comment"> using strm->next_in which will be Z_NULL only if in() returned an error. If</span></div>
|
|
<div class="line"><a name="l01036"></a><span class="lineno"> 1036</span> <span class="comment"> strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning</span></div>
|
|
<div class="line"><a name="l01037"></a><span class="lineno"> 1037</span> <span class="comment"> non-zero. (in() will always be called before out(), so strm->next_in is</span></div>
|
|
<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span> <span class="comment"> assured to be defined if out() returns non-zero.) Note that inflateBack()</span></div>
|
|
<div class="line"><a name="l01039"></a><span class="lineno"> 1039</span> <span class="comment"> cannot return Z_OK.</span></div>
|
|
<div class="line"><a name="l01040"></a><span class="lineno"> 1040</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>  </div>
|
|
<div class="line"><a name="l01042"></a><span class="lineno"> 1042</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateBackEnd <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm));</div>
|
|
<div class="line"><a name="l01043"></a><span class="lineno"> 1043</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01044"></a><span class="lineno"> 1044</span> <span class="comment"> All memory allocated by inflateBackInit() is freed.</span></div>
|
|
<div class="line"><a name="l01045"></a><span class="lineno"> 1045</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01046"></a><span class="lineno"> 1046</span> <span class="comment"> inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream</span></div>
|
|
<div class="line"><a name="l01047"></a><span class="lineno"> 1047</span> <span class="comment"> state was inconsistent.</span></div>
|
|
<div class="line"><a name="l01048"></a><span class="lineno"> 1048</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>  </div>
|
|
<div class="line"><a name="l01050"></a><span class="lineno"> 1050</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> zlibCompileFlags <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<span class="keywordtype">void</span>));</div>
|
|
<div class="line"><a name="l01051"></a><span class="lineno"> 1051</span> <span class="comment">/* Return flags indicating compile-time options.</span></div>
|
|
<div class="line"><a name="l01052"></a><span class="lineno"> 1052</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01053"></a><span class="lineno"> 1053</span> <span class="comment"> Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:</span></div>
|
|
<div class="line"><a name="l01054"></a><span class="lineno"> 1054</span> <span class="comment"> 1.0: size of uInt</span></div>
|
|
<div class="line"><a name="l01055"></a><span class="lineno"> 1055</span> <span class="comment"> 3.2: size of uLong</span></div>
|
|
<div class="line"><a name="l01056"></a><span class="lineno"> 1056</span> <span class="comment"> 5.4: size of voidpf (pointer)</span></div>
|
|
<div class="line"><a name="l01057"></a><span class="lineno"> 1057</span> <span class="comment"> 7.6: size of z_off_t</span></div>
|
|
<div class="line"><a name="l01058"></a><span class="lineno"> 1058</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01059"></a><span class="lineno"> 1059</span> <span class="comment"> Compiler, assembler, and debug options:</span></div>
|
|
<div class="line"><a name="l01060"></a><span class="lineno"> 1060</span> <span class="comment"> 8: DEBUG</span></div>
|
|
<div class="line"><a name="l01061"></a><span class="lineno"> 1061</span> <span class="comment"> 9: ASMV or ASMINF -- use ASM code</span></div>
|
|
<div class="line"><a name="l01062"></a><span class="lineno"> 1062</span> <span class="comment"> 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention</span></div>
|
|
<div class="line"><a name="l01063"></a><span class="lineno"> 1063</span> <span class="comment"> 11: 0 (reserved)</span></div>
|
|
<div class="line"><a name="l01064"></a><span class="lineno"> 1064</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01065"></a><span class="lineno"> 1065</span> <span class="comment"> One-time table building (smaller code, but not thread-safe if true):</span></div>
|
|
<div class="line"><a name="l01066"></a><span class="lineno"> 1066</span> <span class="comment"> 12: BUILDFIXED -- build static block decoding tables when needed</span></div>
|
|
<div class="line"><a name="l01067"></a><span class="lineno"> 1067</span> <span class="comment"> 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed</span></div>
|
|
<div class="line"><a name="l01068"></a><span class="lineno"> 1068</span> <span class="comment"> 14,15: 0 (reserved)</span></div>
|
|
<div class="line"><a name="l01069"></a><span class="lineno"> 1069</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01070"></a><span class="lineno"> 1070</span> <span class="comment"> Library content (indicates missing functionality):</span></div>
|
|
<div class="line"><a name="l01071"></a><span class="lineno"> 1071</span> <span class="comment"> 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking</span></div>
|
|
<div class="line"><a name="l01072"></a><span class="lineno"> 1072</span> <span class="comment"> deflate code when not needed)</span></div>
|
|
<div class="line"><a name="l01073"></a><span class="lineno"> 1073</span> <span class="comment"> 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect</span></div>
|
|
<div class="line"><a name="l01074"></a><span class="lineno"> 1074</span> <span class="comment"> and decode gzip streams (to avoid linking crc code)</span></div>
|
|
<div class="line"><a name="l01075"></a><span class="lineno"> 1075</span> <span class="comment"> 18-19: 0 (reserved)</span></div>
|
|
<div class="line"><a name="l01076"></a><span class="lineno"> 1076</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01077"></a><span class="lineno"> 1077</span> <span class="comment"> Operation variations (changes in library functionality):</span></div>
|
|
<div class="line"><a name="l01078"></a><span class="lineno"> 1078</span> <span class="comment"> 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate</span></div>
|
|
<div class="line"><a name="l01079"></a><span class="lineno"> 1079</span> <span class="comment"> 21: FASTEST -- deflate algorithm with only one, lowest compression level</span></div>
|
|
<div class="line"><a name="l01080"></a><span class="lineno"> 1080</span> <span class="comment"> 22,23: 0 (reserved)</span></div>
|
|
<div class="line"><a name="l01081"></a><span class="lineno"> 1081</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01082"></a><span class="lineno"> 1082</span> <span class="comment"> The sprintf variant used by gzprintf (zero is best):</span></div>
|
|
<div class="line"><a name="l01083"></a><span class="lineno"> 1083</span> <span class="comment"> 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format</span></div>
|
|
<div class="line"><a name="l01084"></a><span class="lineno"> 1084</span> <span class="comment"> 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!</span></div>
|
|
<div class="line"><a name="l01085"></a><span class="lineno"> 1085</span> <span class="comment"> 26: 0 = returns value, 1 = void -- 1 means inferred string length returned</span></div>
|
|
<div class="line"><a name="l01086"></a><span class="lineno"> 1086</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01087"></a><span class="lineno"> 1087</span> <span class="comment"> Remainder:</span></div>
|
|
<div class="line"><a name="l01088"></a><span class="lineno"> 1088</span> <span class="comment"> 27-31: 0 (reserved)</span></div>
|
|
<div class="line"><a name="l01089"></a><span class="lineno"> 1089</span> <span class="comment"> */</span></div>
|
|
<div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>  </div>
|
|
<div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>  </div>
|
|
<div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>  <span class="comment">/* utility functions */</span></div>
|
|
<div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>  </div>
|
|
<div class="line"><a name="l01094"></a><span class="lineno"> 1094</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01095"></a><span class="lineno"> 1095</span> <span class="comment"> The following utility functions are implemented on top of the basic</span></div>
|
|
<div class="line"><a name="l01096"></a><span class="lineno"> 1096</span> <span class="comment"> stream-oriented functions. To simplify the interface, some default options</span></div>
|
|
<div class="line"><a name="l01097"></a><span class="lineno"> 1097</span> <span class="comment"> are assumed (compression level and memory usage, standard memory allocation</span></div>
|
|
<div class="line"><a name="l01098"></a><span class="lineno"> 1098</span> <span class="comment"> functions). The source code of these utility functions can be modified if</span></div>
|
|
<div class="line"><a name="l01099"></a><span class="lineno"> 1099</span> <span class="comment"> you need special options.</span></div>
|
|
<div class="line"><a name="l01100"></a><span class="lineno"> 1100</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>  </div>
|
|
<div class="line"><a name="l01102"></a><span class="lineno"> 1102</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> compress <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *dest, <a class="code" href="zconf_8h.html#a0426a5a0ed418ec4ae15af8281c64254">uLongf</a> *destLen,</div>
|
|
<div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>  <span class="keyword">const</span> <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *source, <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> sourceLen));</div>
|
|
<div class="line"><a name="l01104"></a><span class="lineno"> 1104</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01105"></a><span class="lineno"> 1105</span> <span class="comment"> Compresses the source buffer into the destination buffer. sourceLen is</span></div>
|
|
<div class="line"><a name="l01106"></a><span class="lineno"> 1106</span> <span class="comment"> the byte length of the source buffer. Upon entry, destLen is the total size</span></div>
|
|
<div class="line"><a name="l01107"></a><span class="lineno"> 1107</span> <span class="comment"> of the destination buffer, which must be at least the value returned by</span></div>
|
|
<div class="line"><a name="l01108"></a><span class="lineno"> 1108</span> <span class="comment"> compressBound(sourceLen). Upon exit, destLen is the actual size of the</span></div>
|
|
<div class="line"><a name="l01109"></a><span class="lineno"> 1109</span> <span class="comment"> compressed buffer.</span></div>
|
|
<div class="line"><a name="l01110"></a><span class="lineno"> 1110</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01111"></a><span class="lineno"> 1111</span> <span class="comment"> compress returns Z_OK if success, Z_MEM_ERROR if there was not</span></div>
|
|
<div class="line"><a name="l01112"></a><span class="lineno"> 1112</span> <span class="comment"> enough memory, Z_BUF_ERROR if there was not enough room in the output</span></div>
|
|
<div class="line"><a name="l01113"></a><span class="lineno"> 1113</span> <span class="comment"> buffer.</span></div>
|
|
<div class="line"><a name="l01114"></a><span class="lineno"> 1114</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>  </div>
|
|
<div class="line"><a name="l01116"></a><span class="lineno"> 1116</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> compress2 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *dest, <a class="code" href="zconf_8h.html#a0426a5a0ed418ec4ae15af8281c64254">uLongf</a> *destLen,</div>
|
|
<div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>  <span class="keyword">const</span> <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *source, <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> sourceLen,</div>
|
|
<div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>  <span class="keywordtype">int</span> level));</div>
|
|
<div class="line"><a name="l01119"></a><span class="lineno"> 1119</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01120"></a><span class="lineno"> 1120</span> <span class="comment"> Compresses the source buffer into the destination buffer. The level</span></div>
|
|
<div class="line"><a name="l01121"></a><span class="lineno"> 1121</span> <span class="comment"> parameter has the same meaning as in deflateInit. sourceLen is the byte</span></div>
|
|
<div class="line"><a name="l01122"></a><span class="lineno"> 1122</span> <span class="comment"> length of the source buffer. Upon entry, destLen is the total size of the</span></div>
|
|
<div class="line"><a name="l01123"></a><span class="lineno"> 1123</span> <span class="comment"> destination buffer, which must be at least the value returned by</span></div>
|
|
<div class="line"><a name="l01124"></a><span class="lineno"> 1124</span> <span class="comment"> compressBound(sourceLen). Upon exit, destLen is the actual size of the</span></div>
|
|
<div class="line"><a name="l01125"></a><span class="lineno"> 1125</span> <span class="comment"> compressed buffer.</span></div>
|
|
<div class="line"><a name="l01126"></a><span class="lineno"> 1126</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01127"></a><span class="lineno"> 1127</span> <span class="comment"> compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough</span></div>
|
|
<div class="line"><a name="l01128"></a><span class="lineno"> 1128</span> <span class="comment"> memory, Z_BUF_ERROR if there was not enough room in the output buffer,</span></div>
|
|
<div class="line"><a name="l01129"></a><span class="lineno"> 1129</span> <span class="comment"> Z_STREAM_ERROR if the level parameter is invalid.</span></div>
|
|
<div class="line"><a name="l01130"></a><span class="lineno"> 1130</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>  </div>
|
|
<div class="line"><a name="l01132"></a><span class="lineno"> 1132</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> compressBound <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> sourceLen));</div>
|
|
<div class="line"><a name="l01133"></a><span class="lineno"> 1133</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01134"></a><span class="lineno"> 1134</span> <span class="comment"> compressBound() returns an upper bound on the compressed size after</span></div>
|
|
<div class="line"><a name="l01135"></a><span class="lineno"> 1135</span> <span class="comment"> compress() or compress2() on sourceLen bytes. It would be used before a</span></div>
|
|
<div class="line"><a name="l01136"></a><span class="lineno"> 1136</span> <span class="comment"> compress() or compress2() call to allocate the destination buffer.</span></div>
|
|
<div class="line"><a name="l01137"></a><span class="lineno"> 1137</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>  </div>
|
|
<div class="line"><a name="l01139"></a><span class="lineno"> 1139</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> uncompress <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *dest, <a class="code" href="zconf_8h.html#a0426a5a0ed418ec4ae15af8281c64254">uLongf</a> *destLen,</div>
|
|
<div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>  <span class="keyword">const</span> <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *source, <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> sourceLen));</div>
|
|
<div class="line"><a name="l01141"></a><span class="lineno"> 1141</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01142"></a><span class="lineno"> 1142</span> <span class="comment"> Decompresses the source buffer into the destination buffer. sourceLen is</span></div>
|
|
<div class="line"><a name="l01143"></a><span class="lineno"> 1143</span> <span class="comment"> the byte length of the source buffer. Upon entry, destLen is the total size</span></div>
|
|
<div class="line"><a name="l01144"></a><span class="lineno"> 1144</span> <span class="comment"> of the destination buffer, which must be large enough to hold the entire</span></div>
|
|
<div class="line"><a name="l01145"></a><span class="lineno"> 1145</span> <span class="comment"> uncompressed data. (The size of the uncompressed data must have been saved</span></div>
|
|
<div class="line"><a name="l01146"></a><span class="lineno"> 1146</span> <span class="comment"> previously by the compressor and transmitted to the decompressor by some</span></div>
|
|
<div class="line"><a name="l01147"></a><span class="lineno"> 1147</span> <span class="comment"> mechanism outside the scope of this compression library.) Upon exit, destLen</span></div>
|
|
<div class="line"><a name="l01148"></a><span class="lineno"> 1148</span> <span class="comment"> is the actual size of the uncompressed buffer.</span></div>
|
|
<div class="line"><a name="l01149"></a><span class="lineno"> 1149</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01150"></a><span class="lineno"> 1150</span> <span class="comment"> uncompress returns Z_OK if success, Z_MEM_ERROR if there was not</span></div>
|
|
<div class="line"><a name="l01151"></a><span class="lineno"> 1151</span> <span class="comment"> enough memory, Z_BUF_ERROR if there was not enough room in the output</span></div>
|
|
<div class="line"><a name="l01152"></a><span class="lineno"> 1152</span> <span class="comment"> buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.</span></div>
|
|
<div class="line"><a name="l01153"></a><span class="lineno"> 1153</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>  </div>
|
|
<div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>  </div>
|
|
<div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>  <span class="comment">/* gzip file access functions */</span></div>
|
|
<div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>  </div>
|
|
<div class="line"><a name="l01158"></a><span class="lineno"> 1158</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01159"></a><span class="lineno"> 1159</span> <span class="comment"> This library supports reading and writing files in gzip (.gz) format with</span></div>
|
|
<div class="line"><a name="l01160"></a><span class="lineno"> 1160</span> <span class="comment"> an interface similar to that of stdio, using the functions that start with</span></div>
|
|
<div class="line"><a name="l01161"></a><span class="lineno"> 1161</span> <span class="comment"> "gz". The gzip format is different from the zlib format. gzip is a gzip</span></div>
|
|
<div class="line"><a name="l01162"></a><span class="lineno"> 1162</span> <span class="comment"> wrapper, documented in RFC 1952, wrapped around a deflate stream.</span></div>
|
|
<div class="line"><a name="l01163"></a><span class="lineno"> 1163</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>  </div>
|
|
<div class="line"><a name="l01165"></a><span class="lineno"><a class="line" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc"> 1165</a></span> <span class="keyword">typedef</span> <a class="code" href="zconf_8h.html#aef6ee0fd51b4998d5eae9ffe4e44306c">voidp</a> <a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a>; <span class="comment">/* opaque gzip file descriptor */</span></div>
|
|
<div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>  </div>
|
|
<div class="line"><a name="l01167"></a><span class="lineno"> 1167</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01168"></a><span class="lineno"> 1168</span> <span class="comment">ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));</span></div>
|
|
<div class="line"><a name="l01169"></a><span class="lineno"> 1169</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01170"></a><span class="lineno"> 1170</span> <span class="comment"> Opens a gzip (.gz) file for reading or writing. The mode parameter is as</span></div>
|
|
<div class="line"><a name="l01171"></a><span class="lineno"> 1171</span> <span class="comment"> in fopen ("rb" or "wb") but can also include a compression level ("wb9") or</span></div>
|
|
<div class="line"><a name="l01172"></a><span class="lineno"> 1172</span> <span class="comment"> a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only</span></div>
|
|
<div class="line"><a name="l01173"></a><span class="lineno"> 1173</span> <span class="comment"> compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'</span></div>
|
|
<div class="line"><a name="l01174"></a><span class="lineno"> 1174</span> <span class="comment"> for fixed code compression as in "wb9F". (See the description of</span></div>
|
|
<div class="line"><a name="l01175"></a><span class="lineno"> 1175</span> <span class="comment"> deflateInit2 for more information about the strategy parameter.) Also "a"</span></div>
|
|
<div class="line"><a name="l01176"></a><span class="lineno"> 1176</span> <span class="comment"> can be used instead of "w" to request that the gzip stream that will be</span></div>
|
|
<div class="line"><a name="l01177"></a><span class="lineno"> 1177</span> <span class="comment"> written be appended to the file. "+" will result in an error, since reading</span></div>
|
|
<div class="line"><a name="l01178"></a><span class="lineno"> 1178</span> <span class="comment"> and writing to the same gzip file is not supported.</span></div>
|
|
<div class="line"><a name="l01179"></a><span class="lineno"> 1179</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01180"></a><span class="lineno"> 1180</span> <span class="comment"> gzopen can be used to read a file which is not in gzip format; in this</span></div>
|
|
<div class="line"><a name="l01181"></a><span class="lineno"> 1181</span> <span class="comment"> case gzread will directly read from the file without decompression.</span></div>
|
|
<div class="line"><a name="l01182"></a><span class="lineno"> 1182</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01183"></a><span class="lineno"> 1183</span> <span class="comment"> gzopen returns NULL if the file could not be opened, if there was</span></div>
|
|
<div class="line"><a name="l01184"></a><span class="lineno"> 1184</span> <span class="comment"> insufficient memory to allocate the gzFile state, or if an invalid mode was</span></div>
|
|
<div class="line"><a name="l01185"></a><span class="lineno"> 1185</span> <span class="comment"> specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).</span></div>
|
|
<div class="line"><a name="l01186"></a><span class="lineno"> 1186</span> <span class="comment"> errno can be checked to determine if the reason gzopen failed was that the</span></div>
|
|
<div class="line"><a name="l01187"></a><span class="lineno"> 1187</span> <span class="comment"> file could not be opened.</span></div>
|
|
<div class="line"><a name="l01188"></a><span class="lineno"> 1188</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>  </div>
|
|
<div class="line"><a name="l01190"></a><span class="lineno"> 1190</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzdopen <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<span class="keywordtype">int</span> fd, <span class="keyword">const</span> <span class="keywordtype">char</span> *mode));</div>
|
|
<div class="line"><a name="l01191"></a><span class="lineno"> 1191</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01192"></a><span class="lineno"> 1192</span> <span class="comment"> gzdopen associates a gzFile with the file descriptor fd. File descriptors</span></div>
|
|
<div class="line"><a name="l01193"></a><span class="lineno"> 1193</span> <span class="comment"> are obtained from calls like open, dup, creat, pipe or fileno (if the file</span></div>
|
|
<div class="line"><a name="l01194"></a><span class="lineno"> 1194</span> <span class="comment"> has been previously opened with fopen). The mode parameter is as in gzopen.</span></div>
|
|
<div class="line"><a name="l01195"></a><span class="lineno"> 1195</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01196"></a><span class="lineno"> 1196</span> <span class="comment"> The next call of gzclose on the returned gzFile will also close the file</span></div>
|
|
<div class="line"><a name="l01197"></a><span class="lineno"> 1197</span> <span class="comment"> descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor</span></div>
|
|
<div class="line"><a name="l01198"></a><span class="lineno"> 1198</span> <span class="comment"> fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,</span></div>
|
|
<div class="line"><a name="l01199"></a><span class="lineno"> 1199</span> <span class="comment"> mode);. The duplicated descriptor should be saved to avoid a leak, since</span></div>
|
|
<div class="line"><a name="l01200"></a><span class="lineno"> 1200</span> <span class="comment"> gzdopen does not close fd if it fails.</span></div>
|
|
<div class="line"><a name="l01201"></a><span class="lineno"> 1201</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01202"></a><span class="lineno"> 1202</span> <span class="comment"> gzdopen returns NULL if there was insufficient memory to allocate the</span></div>
|
|
<div class="line"><a name="l01203"></a><span class="lineno"> 1203</span> <span class="comment"> gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not</span></div>
|
|
<div class="line"><a name="l01204"></a><span class="lineno"> 1204</span> <span class="comment"> provided, or '+' was provided), or if fd is -1. The file descriptor is not</span></div>
|
|
<div class="line"><a name="l01205"></a><span class="lineno"> 1205</span> <span class="comment"> used until the next gz* read, write, seek, or close operation, so gzdopen</span></div>
|
|
<div class="line"><a name="l01206"></a><span class="lineno"> 1206</span> <span class="comment"> will not detect if fd is invalid (unless fd is -1).</span></div>
|
|
<div class="line"><a name="l01207"></a><span class="lineno"> 1207</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>  </div>
|
|
<div class="line"><a name="l01209"></a><span class="lineno"> 1209</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzbuffer <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file, <span class="keywordtype">unsigned</span> size));</div>
|
|
<div class="line"><a name="l01210"></a><span class="lineno"> 1210</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01211"></a><span class="lineno"> 1211</span> <span class="comment"> Set the internal buffer size used by this library's functions. The</span></div>
|
|
<div class="line"><a name="l01212"></a><span class="lineno"> 1212</span> <span class="comment"> default buffer size is 8192 bytes. This function must be called after</span></div>
|
|
<div class="line"><a name="l01213"></a><span class="lineno"> 1213</span> <span class="comment"> gzopen() or gzdopen(), and before any other calls that read or write the</span></div>
|
|
<div class="line"><a name="l01214"></a><span class="lineno"> 1214</span> <span class="comment"> file. The buffer memory allocation is always deferred to the first read or</span></div>
|
|
<div class="line"><a name="l01215"></a><span class="lineno"> 1215</span> <span class="comment"> write. Two buffers are allocated, either both of the specified size when</span></div>
|
|
<div class="line"><a name="l01216"></a><span class="lineno"> 1216</span> <span class="comment"> writing, or one of the specified size and the other twice that size when</span></div>
|
|
<div class="line"><a name="l01217"></a><span class="lineno"> 1217</span> <span class="comment"> reading. A larger buffer size of, for example, 64K or 128K bytes will</span></div>
|
|
<div class="line"><a name="l01218"></a><span class="lineno"> 1218</span> <span class="comment"> noticeably increase the speed of decompression (reading).</span></div>
|
|
<div class="line"><a name="l01219"></a><span class="lineno"> 1219</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01220"></a><span class="lineno"> 1220</span> <span class="comment"> The new buffer size also affects the maximum length for gzprintf().</span></div>
|
|
<div class="line"><a name="l01221"></a><span class="lineno"> 1221</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01222"></a><span class="lineno"> 1222</span> <span class="comment"> gzbuffer() returns 0 on success, or -1 on failure, such as being called</span></div>
|
|
<div class="line"><a name="l01223"></a><span class="lineno"> 1223</span> <span class="comment"> too late.</span></div>
|
|
<div class="line"><a name="l01224"></a><span class="lineno"> 1224</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>  </div>
|
|
<div class="line"><a name="l01226"></a><span class="lineno"> 1226</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzsetparams <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file, <span class="keywordtype">int</span> level, <span class="keywordtype">int</span> strategy));</div>
|
|
<div class="line"><a name="l01227"></a><span class="lineno"> 1227</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01228"></a><span class="lineno"> 1228</span> <span class="comment"> Dynamically update the compression level or strategy. See the description</span></div>
|
|
<div class="line"><a name="l01229"></a><span class="lineno"> 1229</span> <span class="comment"> of deflateInit2 for the meaning of these parameters.</span></div>
|
|
<div class="line"><a name="l01230"></a><span class="lineno"> 1230</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01231"></a><span class="lineno"> 1231</span> <span class="comment"> gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not</span></div>
|
|
<div class="line"><a name="l01232"></a><span class="lineno"> 1232</span> <span class="comment"> opened for writing.</span></div>
|
|
<div class="line"><a name="l01233"></a><span class="lineno"> 1233</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>  </div>
|
|
<div class="line"><a name="l01235"></a><span class="lineno"> 1235</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzread <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file, <a class="code" href="zconf_8h.html#aef6ee0fd51b4998d5eae9ffe4e44306c">voidp</a> buf, <span class="keywordtype">unsigned</span> len));</div>
|
|
<div class="line"><a name="l01236"></a><span class="lineno"> 1236</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01237"></a><span class="lineno"> 1237</span> <span class="comment"> Reads the given number of uncompressed bytes from the compressed file. If</span></div>
|
|
<div class="line"><a name="l01238"></a><span class="lineno"> 1238</span> <span class="comment"> the input file was not in gzip format, gzread copies the given number of</span></div>
|
|
<div class="line"><a name="l01239"></a><span class="lineno"> 1239</span> <span class="comment"> bytes into the buffer.</span></div>
|
|
<div class="line"><a name="l01240"></a><span class="lineno"> 1240</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01241"></a><span class="lineno"> 1241</span> <span class="comment"> After reaching the end of a gzip stream in the input, gzread will continue</span></div>
|
|
<div class="line"><a name="l01242"></a><span class="lineno"> 1242</span> <span class="comment"> to read, looking for another gzip stream, or failing that, reading the rest</span></div>
|
|
<div class="line"><a name="l01243"></a><span class="lineno"> 1243</span> <span class="comment"> of the input file directly without decompression. The entire input file</span></div>
|
|
<div class="line"><a name="l01244"></a><span class="lineno"> 1244</span> <span class="comment"> will be read if gzread is called until it returns less than the requested</span></div>
|
|
<div class="line"><a name="l01245"></a><span class="lineno"> 1245</span> <span class="comment"> len.</span></div>
|
|
<div class="line"><a name="l01246"></a><span class="lineno"> 1246</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01247"></a><span class="lineno"> 1247</span> <span class="comment"> gzread returns the number of uncompressed bytes actually read, less than</span></div>
|
|
<div class="line"><a name="l01248"></a><span class="lineno"> 1248</span> <span class="comment"> len for end of file, or -1 for error.</span></div>
|
|
<div class="line"><a name="l01249"></a><span class="lineno"> 1249</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01250"></a><span class="lineno"> 1250</span>  </div>
|
|
<div class="line"><a name="l01251"></a><span class="lineno"> 1251</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzwrite <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file,</div>
|
|
<div class="line"><a name="l01252"></a><span class="lineno"> 1252</span>  <a class="code" href="zconf_8h.html#af8cecac6ece650139013566539138038">voidpc</a> buf, <span class="keywordtype">unsigned</span> len));</div>
|
|
<div class="line"><a name="l01253"></a><span class="lineno"> 1253</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01254"></a><span class="lineno"> 1254</span> <span class="comment"> Writes the given number of uncompressed bytes into the compressed file.</span></div>
|
|
<div class="line"><a name="l01255"></a><span class="lineno"> 1255</span> <span class="comment"> gzwrite returns the number of uncompressed bytes written or 0 in case of</span></div>
|
|
<div class="line"><a name="l01256"></a><span class="lineno"> 1256</span> <span class="comment"> error.</span></div>
|
|
<div class="line"><a name="l01257"></a><span class="lineno"> 1257</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>  </div>
|
|
<div class="line"><a name="l01259"></a><span class="lineno"> 1259</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#af38d1853df635eee27f1a02f96457b22">ZEXPORTVA</a> gzprintf <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file, <span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...));</div>
|
|
<div class="line"><a name="l01260"></a><span class="lineno"> 1260</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01261"></a><span class="lineno"> 1261</span> <span class="comment"> Converts, formats, and writes the arguments to the compressed file under</span></div>
|
|
<div class="line"><a name="l01262"></a><span class="lineno"> 1262</span> <span class="comment"> control of the format string, as in fprintf. gzprintf returns the number of</span></div>
|
|
<div class="line"><a name="l01263"></a><span class="lineno"> 1263</span> <span class="comment"> uncompressed bytes actually written, or 0 in case of error. The number of</span></div>
|
|
<div class="line"><a name="l01264"></a><span class="lineno"> 1264</span> <span class="comment"> uncompressed bytes written is limited to 8191, or one less than the buffer</span></div>
|
|
<div class="line"><a name="l01265"></a><span class="lineno"> 1265</span> <span class="comment"> size given to gzbuffer(). The caller should assure that this limit is not</span></div>
|
|
<div class="line"><a name="l01266"></a><span class="lineno"> 1266</span> <span class="comment"> exceeded. If it is exceeded, then gzprintf() will return an error (0) with</span></div>
|
|
<div class="line"><a name="l01267"></a><span class="lineno"> 1267</span> <span class="comment"> nothing written. In this case, there may also be a buffer overflow with</span></div>
|
|
<div class="line"><a name="l01268"></a><span class="lineno"> 1268</span> <span class="comment"> unpredictable consequences, which is possible only if zlib was compiled with</span></div>
|
|
<div class="line"><a name="l01269"></a><span class="lineno"> 1269</span> <span class="comment"> the insecure functions sprintf() or vsprintf() because the secure snprintf()</span></div>
|
|
<div class="line"><a name="l01270"></a><span class="lineno"> 1270</span> <span class="comment"> or vsnprintf() functions were not available. This can be determined using</span></div>
|
|
<div class="line"><a name="l01271"></a><span class="lineno"> 1271</span> <span class="comment"> zlibCompileFlags().</span></div>
|
|
<div class="line"><a name="l01272"></a><span class="lineno"> 1272</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01273"></a><span class="lineno"> 1273</span>  </div>
|
|
<div class="line"><a name="l01274"></a><span class="lineno"> 1274</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzputs <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file, <span class="keyword">const</span> <span class="keywordtype">char</span> *s));</div>
|
|
<div class="line"><a name="l01275"></a><span class="lineno"> 1275</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01276"></a><span class="lineno"> 1276</span> <span class="comment"> Writes the given null-terminated string to the compressed file, excluding</span></div>
|
|
<div class="line"><a name="l01277"></a><span class="lineno"> 1277</span> <span class="comment"> the terminating null character.</span></div>
|
|
<div class="line"><a name="l01278"></a><span class="lineno"> 1278</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01279"></a><span class="lineno"> 1279</span> <span class="comment"> gzputs returns the number of characters written, or -1 in case of error.</span></div>
|
|
<div class="line"><a name="l01280"></a><span class="lineno"> 1280</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01281"></a><span class="lineno"> 1281</span>  </div>
|
|
<div class="line"><a name="l01282"></a><span class="lineno"> 1282</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">char</span> * <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzgets <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file, <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len));</div>
|
|
<div class="line"><a name="l01283"></a><span class="lineno"> 1283</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01284"></a><span class="lineno"> 1284</span> <span class="comment"> Reads bytes from the compressed file until len-1 characters are read, or a</span></div>
|
|
<div class="line"><a name="l01285"></a><span class="lineno"> 1285</span> <span class="comment"> newline character is read and transferred to buf, or an end-of-file</span></div>
|
|
<div class="line"><a name="l01286"></a><span class="lineno"> 1286</span> <span class="comment"> condition is encountered. If any characters are read or if len == 1, the</span></div>
|
|
<div class="line"><a name="l01287"></a><span class="lineno"> 1287</span> <span class="comment"> string is terminated with a null character. If no characters are read due</span></div>
|
|
<div class="line"><a name="l01288"></a><span class="lineno"> 1288</span> <span class="comment"> to an end-of-file or len < 1, then the buffer is left untouched.</span></div>
|
|
<div class="line"><a name="l01289"></a><span class="lineno"> 1289</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01290"></a><span class="lineno"> 1290</span> <span class="comment"> gzgets returns buf which is a null-terminated string, or it returns NULL</span></div>
|
|
<div class="line"><a name="l01291"></a><span class="lineno"> 1291</span> <span class="comment"> for end-of-file or in case of error. If there was an error, the contents at</span></div>
|
|
<div class="line"><a name="l01292"></a><span class="lineno"> 1292</span> <span class="comment"> buf are indeterminate.</span></div>
|
|
<div class="line"><a name="l01293"></a><span class="lineno"> 1293</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01294"></a><span class="lineno"> 1294</span>  </div>
|
|
<div class="line"><a name="l01295"></a><span class="lineno"> 1295</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzputc <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file, <span class="keywordtype">int</span> c));</div>
|
|
<div class="line"><a name="l01296"></a><span class="lineno"> 1296</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01297"></a><span class="lineno"> 1297</span> <span class="comment"> Writes c, converted to an unsigned char, into the compressed file. gzputc</span></div>
|
|
<div class="line"><a name="l01298"></a><span class="lineno"> 1298</span> <span class="comment"> returns the value that was written, or -1 in case of error.</span></div>
|
|
<div class="line"><a name="l01299"></a><span class="lineno"> 1299</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01300"></a><span class="lineno"> 1300</span>  </div>
|
|
<div class="line"><a name="l01301"></a><span class="lineno"> 1301</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzgetc <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file));</div>
|
|
<div class="line"><a name="l01302"></a><span class="lineno"> 1302</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01303"></a><span class="lineno"> 1303</span> <span class="comment"> Reads one byte from the compressed file. gzgetc returns this byte or -1</span></div>
|
|
<div class="line"><a name="l01304"></a><span class="lineno"> 1304</span> <span class="comment"> in case of end of file or error.</span></div>
|
|
<div class="line"><a name="l01305"></a><span class="lineno"> 1305</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01306"></a><span class="lineno"> 1306</span>  </div>
|
|
<div class="line"><a name="l01307"></a><span class="lineno"> 1307</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzungetc <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<span class="keywordtype">int</span> c, <a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file));</div>
|
|
<div class="line"><a name="l01308"></a><span class="lineno"> 1308</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01309"></a><span class="lineno"> 1309</span> <span class="comment"> Push one character back onto the stream to be read as the first character</span></div>
|
|
<div class="line"><a name="l01310"></a><span class="lineno"> 1310</span> <span class="comment"> on the next read. At least one character of push-back is allowed.</span></div>
|
|
<div class="line"><a name="l01311"></a><span class="lineno"> 1311</span> <span class="comment"> gzungetc() returns the character pushed, or -1 on failure. gzungetc() will</span></div>
|
|
<div class="line"><a name="l01312"></a><span class="lineno"> 1312</span> <span class="comment"> fail if c is -1, and may fail if a character has been pushed but not read</span></div>
|
|
<div class="line"><a name="l01313"></a><span class="lineno"> 1313</span> <span class="comment"> yet. If gzungetc is used immediately after gzopen or gzdopen, at least the</span></div>
|
|
<div class="line"><a name="l01314"></a><span class="lineno"> 1314</span> <span class="comment"> output buffer size of pushed characters is allowed. (See gzbuffer above.)</span></div>
|
|
<div class="line"><a name="l01315"></a><span class="lineno"> 1315</span> <span class="comment"> The pushed character will be discarded if the stream is repositioned with</span></div>
|
|
<div class="line"><a name="l01316"></a><span class="lineno"> 1316</span> <span class="comment"> gzseek() or gzrewind().</span></div>
|
|
<div class="line"><a name="l01317"></a><span class="lineno"> 1317</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01318"></a><span class="lineno"> 1318</span>  </div>
|
|
<div class="line"><a name="l01319"></a><span class="lineno"> 1319</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzflush <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file, <span class="keywordtype">int</span> flush));</div>
|
|
<div class="line"><a name="l01320"></a><span class="lineno"> 1320</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01321"></a><span class="lineno"> 1321</span> <span class="comment"> Flushes all pending output into the compressed file. The parameter flush</span></div>
|
|
<div class="line"><a name="l01322"></a><span class="lineno"> 1322</span> <span class="comment"> is as in the deflate() function. The return value is the zlib error number</span></div>
|
|
<div class="line"><a name="l01323"></a><span class="lineno"> 1323</span> <span class="comment"> (see function gzerror below). gzflush is only permitted when writing.</span></div>
|
|
<div class="line"><a name="l01324"></a><span class="lineno"> 1324</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01325"></a><span class="lineno"> 1325</span> <span class="comment"> If the flush parameter is Z_FINISH, the remaining data is written and the</span></div>
|
|
<div class="line"><a name="l01326"></a><span class="lineno"> 1326</span> <span class="comment"> gzip stream is completed in the output. If gzwrite() is called again, a new</span></div>
|
|
<div class="line"><a name="l01327"></a><span class="lineno"> 1327</span> <span class="comment"> gzip stream will be started in the output. gzread() is able to read such</span></div>
|
|
<div class="line"><a name="l01328"></a><span class="lineno"> 1328</span> <span class="comment"> concatented gzip streams.</span></div>
|
|
<div class="line"><a name="l01329"></a><span class="lineno"> 1329</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01330"></a><span class="lineno"> 1330</span> <span class="comment"> gzflush should be called only when strictly necessary because it will</span></div>
|
|
<div class="line"><a name="l01331"></a><span class="lineno"> 1331</span> <span class="comment"> degrade compression if called too often.</span></div>
|
|
<div class="line"><a name="l01332"></a><span class="lineno"> 1332</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01333"></a><span class="lineno"> 1333</span>  </div>
|
|
<div class="line"><a name="l01334"></a><span class="lineno"> 1334</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01335"></a><span class="lineno"> 1335</span> <span class="comment">ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,</span></div>
|
|
<div class="line"><a name="l01336"></a><span class="lineno"> 1336</span> <span class="comment"> z_off_t offset, int whence));</span></div>
|
|
<div class="line"><a name="l01337"></a><span class="lineno"> 1337</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01338"></a><span class="lineno"> 1338</span> <span class="comment"> Sets the starting position for the next gzread or gzwrite on the given</span></div>
|
|
<div class="line"><a name="l01339"></a><span class="lineno"> 1339</span> <span class="comment"> compressed file. The offset represents a number of bytes in the</span></div>
|
|
<div class="line"><a name="l01340"></a><span class="lineno"> 1340</span> <span class="comment"> uncompressed data stream. The whence parameter is defined as in lseek(2);</span></div>
|
|
<div class="line"><a name="l01341"></a><span class="lineno"> 1341</span> <span class="comment"> the value SEEK_END is not supported.</span></div>
|
|
<div class="line"><a name="l01342"></a><span class="lineno"> 1342</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01343"></a><span class="lineno"> 1343</span> <span class="comment"> If the file is opened for reading, this function is emulated but can be</span></div>
|
|
<div class="line"><a name="l01344"></a><span class="lineno"> 1344</span> <span class="comment"> extremely slow. If the file is opened for writing, only forward seeks are</span></div>
|
|
<div class="line"><a name="l01345"></a><span class="lineno"> 1345</span> <span class="comment"> supported; gzseek then compresses a sequence of zeroes up to the new</span></div>
|
|
<div class="line"><a name="l01346"></a><span class="lineno"> 1346</span> <span class="comment"> starting position.</span></div>
|
|
<div class="line"><a name="l01347"></a><span class="lineno"> 1347</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01348"></a><span class="lineno"> 1348</span> <span class="comment"> gzseek returns the resulting offset location as measured in bytes from</span></div>
|
|
<div class="line"><a name="l01349"></a><span class="lineno"> 1349</span> <span class="comment"> the beginning of the uncompressed stream, or -1 in case of error, in</span></div>
|
|
<div class="line"><a name="l01350"></a><span class="lineno"> 1350</span> <span class="comment"> particular if the file is opened for writing and the new starting position</span></div>
|
|
<div class="line"><a name="l01351"></a><span class="lineno"> 1351</span> <span class="comment"> would be before the current position.</span></div>
|
|
<div class="line"><a name="l01352"></a><span class="lineno"> 1352</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01353"></a><span class="lineno"> 1353</span>  </div>
|
|
<div class="line"><a name="l01354"></a><span class="lineno"> 1354</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzrewind <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file));</div>
|
|
<div class="line"><a name="l01355"></a><span class="lineno"> 1355</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01356"></a><span class="lineno"> 1356</span> <span class="comment"> Rewinds the given file. This function is supported only for reading.</span></div>
|
|
<div class="line"><a name="l01357"></a><span class="lineno"> 1357</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01358"></a><span class="lineno"> 1358</span> <span class="comment"> gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)</span></div>
|
|
<div class="line"><a name="l01359"></a><span class="lineno"> 1359</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01360"></a><span class="lineno"> 1360</span>  </div>
|
|
<div class="line"><a name="l01361"></a><span class="lineno"> 1361</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01362"></a><span class="lineno"> 1362</span> <span class="comment">ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));</span></div>
|
|
<div class="line"><a name="l01363"></a><span class="lineno"> 1363</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01364"></a><span class="lineno"> 1364</span> <span class="comment"> Returns the starting position for the next gzread or gzwrite on the given</span></div>
|
|
<div class="line"><a name="l01365"></a><span class="lineno"> 1365</span> <span class="comment"> compressed file. This position represents a number of bytes in the</span></div>
|
|
<div class="line"><a name="l01366"></a><span class="lineno"> 1366</span> <span class="comment"> uncompressed data stream, and is zero when starting, even if appending or</span></div>
|
|
<div class="line"><a name="l01367"></a><span class="lineno"> 1367</span> <span class="comment"> reading a gzip stream from the middle of a file using gzdopen().</span></div>
|
|
<div class="line"><a name="l01368"></a><span class="lineno"> 1368</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01369"></a><span class="lineno"> 1369</span> <span class="comment"> gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)</span></div>
|
|
<div class="line"><a name="l01370"></a><span class="lineno"> 1370</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01371"></a><span class="lineno"> 1371</span>  </div>
|
|
<div class="line"><a name="l01372"></a><span class="lineno"> 1372</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01373"></a><span class="lineno"> 1373</span> <span class="comment">ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));</span></div>
|
|
<div class="line"><a name="l01374"></a><span class="lineno"> 1374</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01375"></a><span class="lineno"> 1375</span> <span class="comment"> Returns the current offset in the file being read or written. This offset</span></div>
|
|
<div class="line"><a name="l01376"></a><span class="lineno"> 1376</span> <span class="comment"> includes the count of bytes that precede the gzip stream, for example when</span></div>
|
|
<div class="line"><a name="l01377"></a><span class="lineno"> 1377</span> <span class="comment"> appending or when using gzdopen() for reading. When reading, the offset</span></div>
|
|
<div class="line"><a name="l01378"></a><span class="lineno"> 1378</span> <span class="comment"> does not include as yet unused buffered input. This information can be used</span></div>
|
|
<div class="line"><a name="l01379"></a><span class="lineno"> 1379</span> <span class="comment"> for a progress indicator. On error, gzoffset() returns -1.</span></div>
|
|
<div class="line"><a name="l01380"></a><span class="lineno"> 1380</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01381"></a><span class="lineno"> 1381</span>  </div>
|
|
<div class="line"><a name="l01382"></a><span class="lineno"> 1382</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzeof <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file));</div>
|
|
<div class="line"><a name="l01383"></a><span class="lineno"> 1383</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01384"></a><span class="lineno"> 1384</span> <span class="comment"> Returns true (1) if the end-of-file indicator has been set while reading,</span></div>
|
|
<div class="line"><a name="l01385"></a><span class="lineno"> 1385</span> <span class="comment"> false (0) otherwise. Note that the end-of-file indicator is set only if the</span></div>
|
|
<div class="line"><a name="l01386"></a><span class="lineno"> 1386</span> <span class="comment"> read tried to go past the end of the input, but came up short. Therefore,</span></div>
|
|
<div class="line"><a name="l01387"></a><span class="lineno"> 1387</span> <span class="comment"> just like feof(), gzeof() may return false even if there is no more data to</span></div>
|
|
<div class="line"><a name="l01388"></a><span class="lineno"> 1388</span> <span class="comment"> read, in the event that the last read request was for the exact number of</span></div>
|
|
<div class="line"><a name="l01389"></a><span class="lineno"> 1389</span> <span class="comment"> bytes remaining in the input file. This will happen if the input file size</span></div>
|
|
<div class="line"><a name="l01390"></a><span class="lineno"> 1390</span> <span class="comment"> is an exact multiple of the buffer size.</span></div>
|
|
<div class="line"><a name="l01391"></a><span class="lineno"> 1391</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01392"></a><span class="lineno"> 1392</span> <span class="comment"> If gzeof() returns true, then the read functions will return no more data,</span></div>
|
|
<div class="line"><a name="l01393"></a><span class="lineno"> 1393</span> <span class="comment"> unless the end-of-file indicator is reset by gzclearerr() and the input file</span></div>
|
|
<div class="line"><a name="l01394"></a><span class="lineno"> 1394</span> <span class="comment"> has grown since the previous end of file was detected.</span></div>
|
|
<div class="line"><a name="l01395"></a><span class="lineno"> 1395</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01396"></a><span class="lineno"> 1396</span>  </div>
|
|
<div class="line"><a name="l01397"></a><span class="lineno"> 1397</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzdirect <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file));</div>
|
|
<div class="line"><a name="l01398"></a><span class="lineno"> 1398</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01399"></a><span class="lineno"> 1399</span> <span class="comment"> Returns true (1) if file is being copied directly while reading, or false</span></div>
|
|
<div class="line"><a name="l01400"></a><span class="lineno"> 1400</span> <span class="comment"> (0) if file is a gzip stream being decompressed. This state can change from</span></div>
|
|
<div class="line"><a name="l01401"></a><span class="lineno"> 1401</span> <span class="comment"> false to true while reading the input file if the end of a gzip stream is</span></div>
|
|
<div class="line"><a name="l01402"></a><span class="lineno"> 1402</span> <span class="comment"> reached, but is followed by data that is not another gzip stream.</span></div>
|
|
<div class="line"><a name="l01403"></a><span class="lineno"> 1403</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01404"></a><span class="lineno"> 1404</span> <span class="comment"> If the input file is empty, gzdirect() will return true, since the input</span></div>
|
|
<div class="line"><a name="l01405"></a><span class="lineno"> 1405</span> <span class="comment"> does not contain a gzip stream.</span></div>
|
|
<div class="line"><a name="l01406"></a><span class="lineno"> 1406</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01407"></a><span class="lineno"> 1407</span> <span class="comment"> If gzdirect() is used immediately after gzopen() or gzdopen() it will</span></div>
|
|
<div class="line"><a name="l01408"></a><span class="lineno"> 1408</span> <span class="comment"> cause buffers to be allocated to allow reading the file to determine if it</span></div>
|
|
<div class="line"><a name="l01409"></a><span class="lineno"> 1409</span> <span class="comment"> is a gzip file. Therefore if gzbuffer() is used, it should be called before</span></div>
|
|
<div class="line"><a name="l01410"></a><span class="lineno"> 1410</span> <span class="comment"> gzdirect().</span></div>
|
|
<div class="line"><a name="l01411"></a><span class="lineno"> 1411</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01412"></a><span class="lineno"> 1412</span>  </div>
|
|
<div class="line"><a name="l01413"></a><span class="lineno"> 1413</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzclose <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file));</div>
|
|
<div class="line"><a name="l01414"></a><span class="lineno"> 1414</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01415"></a><span class="lineno"> 1415</span> <span class="comment"> Flushes all pending output if necessary, closes the compressed file and</span></div>
|
|
<div class="line"><a name="l01416"></a><span class="lineno"> 1416</span> <span class="comment"> deallocates the (de)compression state. Note that once file is closed, you</span></div>
|
|
<div class="line"><a name="l01417"></a><span class="lineno"> 1417</span> <span class="comment"> cannot call gzerror with file, since its structures have been deallocated.</span></div>
|
|
<div class="line"><a name="l01418"></a><span class="lineno"> 1418</span> <span class="comment"> gzclose must not be called more than once on the same file, just as free</span></div>
|
|
<div class="line"><a name="l01419"></a><span class="lineno"> 1419</span> <span class="comment"> must not be called more than once on the same allocation.</span></div>
|
|
<div class="line"><a name="l01420"></a><span class="lineno"> 1420</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01421"></a><span class="lineno"> 1421</span> <span class="comment"> gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a</span></div>
|
|
<div class="line"><a name="l01422"></a><span class="lineno"> 1422</span> <span class="comment"> file operation error, or Z_OK on success.</span></div>
|
|
<div class="line"><a name="l01423"></a><span class="lineno"> 1423</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01424"></a><span class="lineno"> 1424</span>  </div>
|
|
<div class="line"><a name="l01425"></a><span class="lineno"> 1425</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzclose_r <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file));</div>
|
|
<div class="line"><a name="l01426"></a><span class="lineno"> 1426</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzclose_w <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file));</div>
|
|
<div class="line"><a name="l01427"></a><span class="lineno"> 1427</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01428"></a><span class="lineno"> 1428</span> <span class="comment"> Same as gzclose(), but gzclose_r() is only for use when reading, and</span></div>
|
|
<div class="line"><a name="l01429"></a><span class="lineno"> 1429</span> <span class="comment"> gzclose_w() is only for use when writing or appending. The advantage to</span></div>
|
|
<div class="line"><a name="l01430"></a><span class="lineno"> 1430</span> <span class="comment"> using these instead of gzclose() is that they avoid linking in zlib</span></div>
|
|
<div class="line"><a name="l01431"></a><span class="lineno"> 1431</span> <span class="comment"> compression or decompression code that is not used when only reading or only</span></div>
|
|
<div class="line"><a name="l01432"></a><span class="lineno"> 1432</span> <span class="comment"> writing respectively. If gzclose() is used, then both compression and</span></div>
|
|
<div class="line"><a name="l01433"></a><span class="lineno"> 1433</span> <span class="comment"> decompression code will be included the application when linking to a static</span></div>
|
|
<div class="line"><a name="l01434"></a><span class="lineno"> 1434</span> <span class="comment"> zlib library.</span></div>
|
|
<div class="line"><a name="l01435"></a><span class="lineno"> 1435</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01436"></a><span class="lineno"> 1436</span>  </div>
|
|
<div class="line"><a name="l01437"></a><span class="lineno"> 1437</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzerror <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file, <span class="keywordtype">int</span> *errnum));</div>
|
|
<div class="line"><a name="l01438"></a><span class="lineno"> 1438</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01439"></a><span class="lineno"> 1439</span> <span class="comment"> Returns the error message for the last error which occurred on the given</span></div>
|
|
<div class="line"><a name="l01440"></a><span class="lineno"> 1440</span> <span class="comment"> compressed file. errnum is set to zlib error number. If an error occurred</span></div>
|
|
<div class="line"><a name="l01441"></a><span class="lineno"> 1441</span> <span class="comment"> in the file system and not in the compression library, errnum is set to</span></div>
|
|
<div class="line"><a name="l01442"></a><span class="lineno"> 1442</span> <span class="comment"> Z_ERRNO and the application may consult errno to get the exact error code.</span></div>
|
|
<div class="line"><a name="l01443"></a><span class="lineno"> 1443</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01444"></a><span class="lineno"> 1444</span> <span class="comment"> The application must not modify the returned string. Future calls to</span></div>
|
|
<div class="line"><a name="l01445"></a><span class="lineno"> 1445</span> <span class="comment"> this function may invalidate the previously returned string. If file is</span></div>
|
|
<div class="line"><a name="l01446"></a><span class="lineno"> 1446</span> <span class="comment"> closed, then the string previously returned by gzerror will no longer be</span></div>
|
|
<div class="line"><a name="l01447"></a><span class="lineno"> 1447</span> <span class="comment"> available.</span></div>
|
|
<div class="line"><a name="l01448"></a><span class="lineno"> 1448</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01449"></a><span class="lineno"> 1449</span> <span class="comment"> gzerror() should be used to distinguish errors from end-of-file for those</span></div>
|
|
<div class="line"><a name="l01450"></a><span class="lineno"> 1450</span> <span class="comment"> functions above that do not distinguish those cases in their return values.</span></div>
|
|
<div class="line"><a name="l01451"></a><span class="lineno"> 1451</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01452"></a><span class="lineno"> 1452</span>  </div>
|
|
<div class="line"><a name="l01453"></a><span class="lineno"> 1453</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">void</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzclearerr <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> file));</div>
|
|
<div class="line"><a name="l01454"></a><span class="lineno"> 1454</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01455"></a><span class="lineno"> 1455</span> <span class="comment"> Clears the error and end-of-file flags for file. This is analogous to the</span></div>
|
|
<div class="line"><a name="l01456"></a><span class="lineno"> 1456</span> <span class="comment"> clearerr() function in stdio. This is useful for continuing to read a gzip</span></div>
|
|
<div class="line"><a name="l01457"></a><span class="lineno"> 1457</span> <span class="comment"> file that is being written concurrently.</span></div>
|
|
<div class="line"><a name="l01458"></a><span class="lineno"> 1458</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01459"></a><span class="lineno"> 1459</span>  </div>
|
|
<div class="line"><a name="l01460"></a><span class="lineno"> 1460</span>  </div>
|
|
<div class="line"><a name="l01461"></a><span class="lineno"> 1461</span>  <span class="comment">/* checksum functions */</span></div>
|
|
<div class="line"><a name="l01462"></a><span class="lineno"> 1462</span>  </div>
|
|
<div class="line"><a name="l01463"></a><span class="lineno"> 1463</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01464"></a><span class="lineno"> 1464</span> <span class="comment"> These functions are not related to compression but are exported</span></div>
|
|
<div class="line"><a name="l01465"></a><span class="lineno"> 1465</span> <span class="comment"> anyway because they might be useful in applications using the compression</span></div>
|
|
<div class="line"><a name="l01466"></a><span class="lineno"> 1466</span> <span class="comment"> library.</span></div>
|
|
<div class="line"><a name="l01467"></a><span class="lineno"> 1467</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01468"></a><span class="lineno"> 1468</span>  </div>
|
|
<div class="line"><a name="l01469"></a><span class="lineno"> 1469</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> adler32 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> adler, <span class="keyword">const</span> <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *buf, <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> len));</div>
|
|
<div class="line"><a name="l01470"></a><span class="lineno"> 1470</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01471"></a><span class="lineno"> 1471</span> <span class="comment"> Update a running Adler-32 checksum with the bytes buf[0..len-1] and</span></div>
|
|
<div class="line"><a name="l01472"></a><span class="lineno"> 1472</span> <span class="comment"> return the updated checksum. If buf is Z_NULL, this function returns the</span></div>
|
|
<div class="line"><a name="l01473"></a><span class="lineno"> 1473</span> <span class="comment"> required initial value for the checksum.</span></div>
|
|
<div class="line"><a name="l01474"></a><span class="lineno"> 1474</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01475"></a><span class="lineno"> 1475</span> <span class="comment"> An Adler-32 checksum is almost as reliable as a CRC32 but can be computed</span></div>
|
|
<div class="line"><a name="l01476"></a><span class="lineno"> 1476</span> <span class="comment"> much faster.</span></div>
|
|
<div class="line"><a name="l01477"></a><span class="lineno"> 1477</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01478"></a><span class="lineno"> 1478</span> <span class="comment"> Usage example:</span></div>
|
|
<div class="line"><a name="l01479"></a><span class="lineno"> 1479</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01480"></a><span class="lineno"> 1480</span> <span class="comment"> uLong adler = adler32(0L, Z_NULL, 0);</span></div>
|
|
<div class="line"><a name="l01481"></a><span class="lineno"> 1481</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01482"></a><span class="lineno"> 1482</span> <span class="comment"> while (read_buffer(buffer, length) != EOF) {</span></div>
|
|
<div class="line"><a name="l01483"></a><span class="lineno"> 1483</span> <span class="comment"> adler = adler32(adler, buffer, length);</span></div>
|
|
<div class="line"><a name="l01484"></a><span class="lineno"> 1484</span> <span class="comment"> }</span></div>
|
|
<div class="line"><a name="l01485"></a><span class="lineno"> 1485</span> <span class="comment"> if (adler != original_adler) error();</span></div>
|
|
<div class="line"><a name="l01486"></a><span class="lineno"> 1486</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01487"></a><span class="lineno"> 1487</span>  </div>
|
|
<div class="line"><a name="l01488"></a><span class="lineno"> 1488</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01489"></a><span class="lineno"> 1489</span> <span class="comment">ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,</span></div>
|
|
<div class="line"><a name="l01490"></a><span class="lineno"> 1490</span> <span class="comment"> z_off_t len2));</span></div>
|
|
<div class="line"><a name="l01491"></a><span class="lineno"> 1491</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01492"></a><span class="lineno"> 1492</span> <span class="comment"> Combine two Adler-32 checksums into one. For two sequences of bytes, seq1</span></div>
|
|
<div class="line"><a name="l01493"></a><span class="lineno"> 1493</span> <span class="comment"> and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for</span></div>
|
|
<div class="line"><a name="l01494"></a><span class="lineno"> 1494</span> <span class="comment"> each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of</span></div>
|
|
<div class="line"><a name="l01495"></a><span class="lineno"> 1495</span> <span class="comment"> seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.</span></div>
|
|
<div class="line"><a name="l01496"></a><span class="lineno"> 1496</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01497"></a><span class="lineno"> 1497</span>  </div>
|
|
<div class="line"><a name="l01498"></a><span class="lineno"> 1498</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> crc32 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> crc, <span class="keyword">const</span> <a class="code" href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a> *buf, <a class="code" href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a> len));</div>
|
|
<div class="line"><a name="l01499"></a><span class="lineno"> 1499</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01500"></a><span class="lineno"> 1500</span> <span class="comment"> Update a running CRC-32 with the bytes buf[0..len-1] and return the</span></div>
|
|
<div class="line"><a name="l01501"></a><span class="lineno"> 1501</span> <span class="comment"> updated CRC-32. If buf is Z_NULL, this function returns the required</span></div>
|
|
<div class="line"><a name="l01502"></a><span class="lineno"> 1502</span> <span class="comment"> initial value for the for the crc. Pre- and post-conditioning (one's</span></div>
|
|
<div class="line"><a name="l01503"></a><span class="lineno"> 1503</span> <span class="comment"> complement) is performed within this function so it shouldn't be done by the</span></div>
|
|
<div class="line"><a name="l01504"></a><span class="lineno"> 1504</span> <span class="comment"> application.</span></div>
|
|
<div class="line"><a name="l01505"></a><span class="lineno"> 1505</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01506"></a><span class="lineno"> 1506</span> <span class="comment"> Usage example:</span></div>
|
|
<div class="line"><a name="l01507"></a><span class="lineno"> 1507</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01508"></a><span class="lineno"> 1508</span> <span class="comment"> uLong crc = crc32(0L, Z_NULL, 0);</span></div>
|
|
<div class="line"><a name="l01509"></a><span class="lineno"> 1509</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01510"></a><span class="lineno"> 1510</span> <span class="comment"> while (read_buffer(buffer, length) != EOF) {</span></div>
|
|
<div class="line"><a name="l01511"></a><span class="lineno"> 1511</span> <span class="comment"> crc = crc32(crc, buffer, length);</span></div>
|
|
<div class="line"><a name="l01512"></a><span class="lineno"> 1512</span> <span class="comment"> }</span></div>
|
|
<div class="line"><a name="l01513"></a><span class="lineno"> 1513</span> <span class="comment"> if (crc != original_crc) error();</span></div>
|
|
<div class="line"><a name="l01514"></a><span class="lineno"> 1514</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01515"></a><span class="lineno"> 1515</span>  </div>
|
|
<div class="line"><a name="l01516"></a><span class="lineno"> 1516</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l01517"></a><span class="lineno"> 1517</span> <span class="comment">ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));</span></div>
|
|
<div class="line"><a name="l01518"></a><span class="lineno"> 1518</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l01519"></a><span class="lineno"> 1519</span> <span class="comment"> Combine two CRC-32 check values into one. For two sequences of bytes,</span></div>
|
|
<div class="line"><a name="l01520"></a><span class="lineno"> 1520</span> <span class="comment"> seq1 and seq2 with lengths len1 and len2, CRC-32 check values were</span></div>
|
|
<div class="line"><a name="l01521"></a><span class="lineno"> 1521</span> <span class="comment"> calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32</span></div>
|
|
<div class="line"><a name="l01522"></a><span class="lineno"> 1522</span> <span class="comment"> check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and</span></div>
|
|
<div class="line"><a name="l01523"></a><span class="lineno"> 1523</span> <span class="comment"> len2.</span></div>
|
|
<div class="line"><a name="l01524"></a><span class="lineno"> 1524</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l01525"></a><span class="lineno"> 1525</span>  </div>
|
|
<div class="line"><a name="l01526"></a><span class="lineno"> 1526</span>  </div>
|
|
<div class="line"><a name="l01527"></a><span class="lineno"> 1527</span>  <span class="comment">/* various hacks, don't look :) */</span></div>
|
|
<div class="line"><a name="l01528"></a><span class="lineno"> 1528</span>  </div>
|
|
<div class="line"><a name="l01529"></a><span class="lineno"> 1529</span> <span class="comment">/* deflateInit and inflateInit are macros to allow checking the zlib version</span></div>
|
|
<div class="line"><a name="l01530"></a><span class="lineno"> 1530</span> <span class="comment"> * and the compiler's view of z_stream:</span></div>
|
|
<div class="line"><a name="l01531"></a><span class="lineno"> 1531</span> <span class="comment"> */</span></div>
|
|
<div class="line"><a name="l01532"></a><span class="lineno"> 1532</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflateInit_ <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm, <span class="keywordtype">int</span> level,</div>
|
|
<div class="line"><a name="l01533"></a><span class="lineno"> 1533</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *version, <span class="keywordtype">int</span> stream_size));</div>
|
|
<div class="line"><a name="l01534"></a><span class="lineno"> 1534</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateInit_ <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm,</div>
|
|
<div class="line"><a name="l01535"></a><span class="lineno"> 1535</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *version, <span class="keywordtype">int</span> stream_size));</div>
|
|
<div class="line"><a name="l01536"></a><span class="lineno"> 1536</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> deflateInit2_ <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm, <span class="keywordtype">int</span> level, <span class="keywordtype">int</span> method,</div>
|
|
<div class="line"><a name="l01537"></a><span class="lineno"> 1537</span>  <span class="keywordtype">int</span> windowBits, <span class="keywordtype">int</span> memLevel,</div>
|
|
<div class="line"><a name="l01538"></a><span class="lineno"> 1538</span>  <span class="keywordtype">int</span> strategy, <span class="keyword">const</span> <span class="keywordtype">char</span> *version,</div>
|
|
<div class="line"><a name="l01539"></a><span class="lineno"> 1539</span>  <span class="keywordtype">int</span> stream_size));</div>
|
|
<div class="line"><a name="l01540"></a><span class="lineno"> 1540</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateInit2_ <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm, <span class="keywordtype">int</span> windowBits,</div>
|
|
<div class="line"><a name="l01541"></a><span class="lineno"> 1541</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *version, <span class="keywordtype">int</span> stream_size));</div>
|
|
<div class="line"><a name="l01542"></a><span class="lineno"> 1542</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateBackInit_ <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a> strm, <span class="keywordtype">int</span> windowBits,</div>
|
|
<div class="line"><a name="l01543"></a><span class="lineno"> 1543</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a> *window,</div>
|
|
<div class="line"><a name="l01544"></a><span class="lineno"> 1544</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *version,</div>
|
|
<div class="line"><a name="l01545"></a><span class="lineno"> 1545</span>  <span class="keywordtype">int</span> stream_size));</div>
|
|
<div class="line"><a name="l01546"></a><span class="lineno"><a class="line" href="zlib_8h.html#ae7440c1c5a8becba6dbf410275dc0a5c"> 1546</a></span> <span class="preprocessor">#define deflateInit(strm, level) \</span></div>
|
|
<div class="line"><a name="l01547"></a><span class="lineno"> 1547</span> <span class="preprocessor"> deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))</span></div>
|
|
<div class="line"><a name="l01548"></a><span class="lineno"><a class="line" href="zlib_8h.html#ad7c6797b618699f70f61323c5184f26e"> 1548</a></span> <span class="preprocessor">#define inflateInit(strm) \</span></div>
|
|
<div class="line"><a name="l01549"></a><span class="lineno"> 1549</span> <span class="preprocessor"> inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))</span></div>
|
|
<div class="line"><a name="l01550"></a><span class="lineno"><a class="line" href="zlib_8h.html#a59b575a521efe7ea0d3b9dd3c8d315c1"> 1550</a></span> <span class="preprocessor">#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \</span></div>
|
|
<div class="line"><a name="l01551"></a><span class="lineno"> 1551</span> <span class="preprocessor"> deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\</span></div>
|
|
<div class="line"><a name="l01552"></a><span class="lineno"> 1552</span> <span class="preprocessor"> (strategy), ZLIB_VERSION, sizeof(z_stream))</span></div>
|
|
<div class="line"><a name="l01553"></a><span class="lineno"><a class="line" href="zlib_8h.html#a611fc206e69f34e812ca8b590982fdd5"> 1553</a></span> <span class="preprocessor">#define inflateInit2(strm, windowBits) \</span></div>
|
|
<div class="line"><a name="l01554"></a><span class="lineno"> 1554</span> <span class="preprocessor"> inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))</span></div>
|
|
<div class="line"><a name="l01555"></a><span class="lineno"><a class="line" href="zlib_8h.html#a9253571ea0fc77cc53c330c0411b8c19"> 1555</a></span> <span class="preprocessor">#define inflateBackInit(strm, windowBits, window) \</span></div>
|
|
<div class="line"><a name="l01556"></a><span class="lineno"> 1556</span> <span class="preprocessor"> inflateBackInit_((strm), (windowBits), (window), \</span></div>
|
|
<div class="line"><a name="l01557"></a><span class="lineno"> 1557</span> <span class="preprocessor"> ZLIB_VERSION, sizeof(z_stream))</span></div>
|
|
<div class="line"><a name="l01558"></a><span class="lineno"> 1558</span>  </div>
|
|
<div class="line"><a name="l01559"></a><span class="lineno"> 1559</span> <span class="comment">/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or</span></div>
|
|
<div class="line"><a name="l01560"></a><span class="lineno"> 1560</span> <span class="comment"> * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if</span></div>
|
|
<div class="line"><a name="l01561"></a><span class="lineno"> 1561</span> <span class="comment"> * both are true, the application gets the *64 functions, and the regular</span></div>
|
|
<div class="line"><a name="l01562"></a><span class="lineno"> 1562</span> <span class="comment"> * functions are changed to 64 bits) -- in case these are set on systems</span></div>
|
|
<div class="line"><a name="l01563"></a><span class="lineno"> 1563</span> <span class="comment"> * without large file support, _LFS64_LARGEFILE must also be true</span></div>
|
|
<div class="line"><a name="l01564"></a><span class="lineno"> 1564</span> <span class="comment"> */</span></div>
|
|
<div class="line"><a name="l01565"></a><span class="lineno"> 1565</span> <span class="preprocessor">#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0</span></div>
|
|
<div class="line"><a name="l01566"></a><span class="lineno"> 1566</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzopen64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *));</div>
|
|
<div class="line"><a name="l01567"></a><span class="lineno"> 1567</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#ab9923767082c7a76924b31493e60d42c">z_off64_t</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzseek64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a>, <a class="code" href="zconf_8h.html#ab9923767082c7a76924b31493e60d42c">z_off64_t</a>, <span class="keywordtype">int</span>));</div>
|
|
<div class="line"><a name="l01568"></a><span class="lineno"> 1568</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#ab9923767082c7a76924b31493e60d42c">z_off64_t</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gztell64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a>));</div>
|
|
<div class="line"><a name="l01569"></a><span class="lineno"> 1569</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#ab9923767082c7a76924b31493e60d42c">z_off64_t</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzoffset64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a>));</div>
|
|
<div class="line"><a name="l01570"></a><span class="lineno"> 1570</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> adler32_combine64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#ab9923767082c7a76924b31493e60d42c">z_off64_t</a>));</div>
|
|
<div class="line"><a name="l01571"></a><span class="lineno"> 1571</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> crc32_combine64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#ab9923767082c7a76924b31493e60d42c">z_off64_t</a>));</div>
|
|
<div class="line"><a name="l01572"></a><span class="lineno"> 1572</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l01573"></a><span class="lineno"> 1573</span>  </div>
|
|
<div class="line"><a name="l01574"></a><span class="lineno"> 1574</span> <span class="preprocessor">#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0</span></div>
|
|
<div class="line"><a name="l01575"></a><span class="lineno"> 1575</span> <span class="preprocessor"># define gzopen gzopen64</span></div>
|
|
<div class="line"><a name="l01576"></a><span class="lineno"> 1576</span> <span class="preprocessor"># define gzseek gzseek64</span></div>
|
|
<div class="line"><a name="l01577"></a><span class="lineno"> 1577</span> <span class="preprocessor"># define gztell gztell64</span></div>
|
|
<div class="line"><a name="l01578"></a><span class="lineno"> 1578</span> <span class="preprocessor"># define gzoffset gzoffset64</span></div>
|
|
<div class="line"><a name="l01579"></a><span class="lineno"> 1579</span> <span class="preprocessor"># define adler32_combine adler32_combine64</span></div>
|
|
<div class="line"><a name="l01580"></a><span class="lineno"> 1580</span> <span class="preprocessor"># define crc32_combine crc32_combine64</span></div>
|
|
<div class="line"><a name="l01581"></a><span class="lineno"> 1581</span> <span class="preprocessor"># ifdef _LARGEFILE64_SOURCE</span></div>
|
|
<div class="line"><a name="l01582"></a><span class="lineno"> 1582</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzopen64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *));</div>
|
|
<div class="line"><a name="l01583"></a><span class="lineno"> 1583</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzseek64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a>, <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a>, <span class="keywordtype">int</span>));</div>
|
|
<div class="line"><a name="l01584"></a><span class="lineno"> 1584</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gztell64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a>));</div>
|
|
<div class="line"><a name="l01585"></a><span class="lineno"> 1585</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzoffset64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a>));</div>
|
|
<div class="line"><a name="l01586"></a><span class="lineno"> 1586</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> adler32_combine64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a>));</div>
|
|
<div class="line"><a name="l01587"></a><span class="lineno"> 1587</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> crc32_combine64 <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a>));</div>
|
|
<div class="line"><a name="l01588"></a><span class="lineno"> 1588</span> <span class="preprocessor"># endif</span></div>
|
|
<div class="line"><a name="l01589"></a><span class="lineno"> 1589</span> <span class="preprocessor">#else</span></div>
|
|
<div class="line"><a name="l01590"></a><span class="lineno"> 1590</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzopen <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *));</div>
|
|
<div class="line"><a name="l01591"></a><span class="lineno"> 1591</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzseek <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a>, <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a>, <span class="keywordtype">int</span>));</div>
|
|
<div class="line"><a name="l01592"></a><span class="lineno"> 1592</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gztell <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a>));</div>
|
|
<div class="line"><a name="l01593"></a><span class="lineno"> 1593</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> gzoffset <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a>));</div>
|
|
<div class="line"><a name="l01594"></a><span class="lineno"> 1594</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> adler32_combine <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a>));</div>
|
|
<div class="line"><a name="l01595"></a><span class="lineno"> 1595</span>  <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> crc32_combine <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a>, <a class="code" href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a>));</div>
|
|
<div class="line"><a name="l01596"></a><span class="lineno"> 1596</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l01597"></a><span class="lineno"> 1597</span>  </div>
|
|
<div class="line"><a name="l01598"></a><span class="lineno"> 1598</span> <span class="comment">/* hack for buggy compilers */</span></div>
|
|
<div class="line"><a name="l01599"></a><span class="lineno"> 1599</span> <span class="preprocessor">#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)</span></div>
|
|
<div class="line"><a name="l01600"></a><span class="lineno"><a class="line" href="zlib_8h.html#a7c1d654b7b6114d7a0abc8d351dd1bcd"> 1600</a></span>  <span class="keyword">struct </span><a class="code" href="zlib_8h.html#structinternal__state">internal_state</a> {<span class="keywordtype">int</span> <a class="code" href="zlib_8h.html#a7c1d654b7b6114d7a0abc8d351dd1bcd">dummy</a>;};</div>
|
|
<div class="line"><a name="l01601"></a><span class="lineno"> 1601</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l01602"></a><span class="lineno"> 1602</span>  </div>
|
|
<div class="line"><a name="l01603"></a><span class="lineno"> 1603</span> <span class="comment">/* undocumented functions */</span></div>
|
|
<div class="line"><a name="l01604"></a><span class="lineno"> 1604</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> zError <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<span class="keywordtype">int</span>));</div>
|
|
<div class="line"><a name="l01605"></a><span class="lineno"> 1605</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateSyncPoint <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a>));</div>
|
|
<div class="line"><a name="l01606"></a><span class="lineno"> 1606</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keyword">const</span> <a class="code" href="zconf_8h.html#a0426a5a0ed418ec4ae15af8281c64254">uLongf</a> * <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> get_crc_table <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<span class="keywordtype">void</span>));</div>
|
|
<div class="line"><a name="l01607"></a><span class="lineno"> 1607</span> <a class="code" href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a> <span class="keywordtype">int</span> <a class="code" href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a> inflateUndermine <a class="code" href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a>((<a class="code" href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a>, <span class="keywordtype">int</span>));</div>
|
|
<div class="line"><a name="l01608"></a><span class="lineno"> 1608</span>  </div>
|
|
<div class="line"><a name="l01609"></a><span class="lineno"> 1609</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
|
|
<div class="line"><a name="l01610"></a><span class="lineno"> 1610</span> }</div>
|
|
<div class="line"><a name="l01611"></a><span class="lineno"> 1611</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l01612"></a><span class="lineno"> 1612</span>  </div>
|
|
<div class="line"><a name="l01613"></a><span class="lineno"> 1613</span> <span class="preprocessor">#endif </span><span class="comment">/* ZLIB_H */</span><span class="preprocessor"></span></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<div class="ttc" id="azconf_8h_html_aeb722a888064be47e12d05f692e0f407"><div class="ttname"><a href="zconf_8h.html#aeb722a888064be47e12d05f692e0f407">Bytef</a></div><div class="ttdeci">Byte FAR Bytef</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00342">zconf.h:342</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_ac21f94cab4411ce1c77771033cff040a"><div class="ttname"><a href="zlib_8h.html#ac21f94cab4411ce1c77771033cff040a">z_stream_s::state</a></div><div class="ttdeci">struct internal_state FAR * state</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00095">zlib.h:95</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a32d2f5216cddb59c7cc8fb2806a7e727"><div class="ttname"><a href="zlib_8h.html#a32d2f5216cddb59c7cc8fb2806a7e727">z_stream_s::msg</a></div><div class="ttdeci">char * msg</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00094">zlib.h:94</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_a2de3690ae41712f1488ce8b89b07141a"><div class="ttname"><a href="zconf_8h.html#a2de3690ae41712f1488ce8b89b07141a">voidpf</a></div><div class="ttdeci">void FAR * voidpf</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00351">zconf.h:351</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_a49b7f5eccfcc99e53178581632bc9589"><div class="ttname"><a href="zconf_8h.html#a49b7f5eccfcc99e53178581632bc9589">ZEXTERN</a></div><div class="ttdeci">#define ZEXTERN</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00319">zconf.h:319</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a6cec1c0c3a9ac1b3c0a8975e382a2b7f"><div class="ttname"><a href="zlib_8h.html#a6cec1c0c3a9ac1b3c0a8975e382a2b7f">gz_header_s::comm_max</a></div><div class="ttdeci">uInt comm_max</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00123">zlib.h:123</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_structz__stream__s"><div class="ttname"><a href="zlib_8h.html#structz__stream__s">z_stream_s</a></div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00085">zlib.h:85</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_ab54066d1aca7e674fbc6d5579cc48894"><div class="ttname"><a href="zlib_8h.html#ab54066d1aca7e674fbc6d5579cc48894">gz_header_s::hcrc</a></div><div class="ttdeci">int hcrc</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00124">zlib.h:124</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a0c98ab56e4779bc5f994fdff60723115"><div class="ttname"><a href="zlib_8h.html#a0c98ab56e4779bc5f994fdff60723115">gz_header_s::os</a></div><div class="ttdeci">int os</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00116">zlib.h:116</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a47eb6f1029f8333d4e55b08296f900dd"><div class="ttname"><a href="zlib_8h.html#a47eb6f1029f8333d4e55b08296f900dd">z_stream_s::data_type</a></div><div class="ttdeci">int data_type</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00101">zlib.h:101</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_ace45f7b8af1035bc35ee7436fdd41081"><div class="ttname"><a href="zlib_8h.html#ace45f7b8af1035bc35ee7436fdd41081">z_stream_s::total_out</a></div><div class="ttdeci">uLong total_out</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00092">zlib.h:92</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a8dcbcbd67c34445b41842b73a6d768f1"><div class="ttname"><a href="zlib_8h.html#a8dcbcbd67c34445b41842b73a6d768f1">gz_header_s::extra_max</a></div><div class="ttdeci">uInt extra_max</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00119">zlib.h:119</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_acd2a5701a3aecf6700d2c66c606ecb40"><div class="ttname"><a href="zconf_8h.html#acd2a5701a3aecf6700d2c66c606ecb40">uLong</a></div><div class="ttdeci">unsigned long uLong</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00336">zconf.h:336</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a5992b274cfdcacdbc1fa8347fd01ebde"><div class="ttname"><a href="zlib_8h.html#a5992b274cfdcacdbc1fa8347fd01ebde">gz_header_s::done</a></div><div class="ttdeci">int done</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00125">zlib.h:125</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_ac4e81bcead752082c53d69e098298de1"><div class="ttname"><a href="zlib_8h.html#ac4e81bcead752082c53d69e098298de1">gz_header_s::comment</a></div><div class="ttdeci">Bytef * comment</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00122">zlib.h:122</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a0b2f68e949d83a93be0e4d0b88148c80"><div class="ttname"><a href="zlib_8h.html#a0b2f68e949d83a93be0e4d0b88148c80">z_stream_s::zalloc</a></div><div class="ttdeci">alloc_func zalloc</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00097">zlib.h:97</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html"><div class="ttname"><a href="zconf_8h.html">zconf.h</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_adbc87684a91f1ff13ca81f2202630b34"><div class="ttname"><a href="zlib_8h.html#adbc87684a91f1ff13ca81f2202630b34">gz_header_s::name</a></div><div class="ttdeci">Bytef * name</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00120">zlib.h:120</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_afb43594753f721206f8751bdc6f311ec"><div class="ttname"><a href="zlib_8h.html#afb43594753f721206f8751bdc6f311ec">z_stream_s::opaque</a></div><div class="ttdeci">voidpf opaque</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00099">zlib.h:99</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_af38d1853df635eee27f1a02f96457b22"><div class="ttname"><a href="zconf_8h.html#af38d1853df635eee27f1a02f96457b22">ZEXPORTVA</a></div><div class="ttdeci">#define ZEXPORTVA</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00325">zconf.h:325</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_a8cf4661a88ec12823d7cbdd3fa629eb0"><div class="ttname"><a href="zconf_8h.html#a8cf4661a88ec12823d7cbdd3fa629eb0">z_off_t</a></div><div class="ttdeci">#define z_off_t</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00394">zconf.h:394</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a40e9dcc294796d99b25e98fb06477fc8"><div class="ttname"><a href="zlib_8h.html#a40e9dcc294796d99b25e98fb06477fc8">gz_headerp</a></div><div class="ttdeci">gz_header FAR * gz_headerp</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00129">zlib.h:129</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_acd0143ddd532551631ecc7093fd7adfc"><div class="ttname"><a href="zlib_8h.html#acd0143ddd532551631ecc7093fd7adfc">gzFile</a></div><div class="ttdeci">voidp gzFile</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l01165">zlib.h:1165</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a74bb92610e11a5515a286f04f906d0db"><div class="ttname"><a href="zlib_8h.html#a74bb92610e11a5515a286f04f906d0db">z_stream_s::adler</a></div><div class="ttdeci">uLong adler</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00102">zlib.h:102</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a4d66380f18f556788b252ca3bb0492a0"><div class="ttname"><a href="zlib_8h.html#a4d66380f18f556788b252ca3bb0492a0">gz_header_s::time</a></div><div class="ttdeci">uLong time</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00114">zlib.h:114</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a5890059f779baab7fc72bca5e3900552"><div class="ttname"><a href="zlib_8h.html#a5890059f779baab7fc72bca5e3900552">gz_header_s::xflags</a></div><div class="ttdeci">int xflags</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00115">zlib.h:115</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a7eb50ccbfeb2368dd84c3a97f409692a"><div class="ttname"><a href="zlib_8h.html#a7eb50ccbfeb2368dd84c3a97f409692a">z_stream_s::avail_in</a></div><div class="ttdeci">uInt avail_in</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00087">zlib.h:87</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_aae85b4a4f7931ee1f67f54c459007421"><div class="ttname"><a href="zlib_8h.html#aae85b4a4f7931ee1f67f54c459007421">gz_header</a></div><div class="ttdeci">struct gz_header_s gz_header</div></div>
|
|
<div class="ttc" id="azlib_8h_html_a7c1d654b7b6114d7a0abc8d351dd1bcd"><div class="ttname"><a href="zlib_8h.html#a7c1d654b7b6114d7a0abc8d351dd1bcd">internal_state::dummy</a></div><div class="ttdeci">int dummy</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l01600">zlib.h:1600</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a90d2f9c7427f2f916b6bbc210bc6d76e"><div class="ttname"><a href="zlib_8h.html#a90d2f9c7427f2f916b6bbc210bc6d76e">OF</a></div><div class="ttdeci">voidpf alloc_func OF((voidpf opaque, uInt items, uInt size))</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00080">zlib.h:80</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a2b260b4b03b66af0a115704504632b68"><div class="ttname"><a href="zlib_8h.html#a2b260b4b03b66af0a115704504632b68">gz_header_s::extra</a></div><div class="ttdeci">Bytef * extra</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00117">zlib.h:117</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a6ede25c84d3c9f8632305866acffb1d6"><div class="ttname"><a href="zlib_8h.html#a6ede25c84d3c9f8632305866acffb1d6">z_streamp</a></div><div class="ttdeci">z_stream FAR * z_streamp</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00106">zlib.h:106</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_ab9923767082c7a76924b31493e60d42c"><div class="ttname"><a href="zconf_8h.html#ab9923767082c7a76924b31493e60d42c">z_off64_t</a></div><div class="ttdeci">#define z_off64_t</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00400">zconf.h:400</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a6926e8fa9e456364c4a931da1508662e"><div class="ttname"><a href="zlib_8h.html#a6926e8fa9e456364c4a931da1508662e">z_stream_s::next_out</a></div><div class="ttdeci">Bytef * next_out</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00090">zlib.h:90</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_aef060b3456fdcc093a7210a762d5f2ed"><div class="ttname"><a href="zconf_8h.html#aef060b3456fdcc093a7210a762d5f2ed">FAR</a></div><div class="ttdeci">#define FAR</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00329">zconf.h:329</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_af8cecac6ece650139013566539138038"><div class="ttname"><a href="zconf_8h.html#af8cecac6ece650139013566539138038">voidpc</a></div><div class="ttdeci">const void * voidpc</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00350">zconf.h:350</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_a0426a5a0ed418ec4ae15af8281c64254"><div class="ttname"><a href="zconf_8h.html#a0426a5a0ed418ec4ae15af8281c64254">uLongf</a></div><div class="ttdeci">uLong FAR uLongf</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00347">zconf.h:347</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_aa4751fbf6d882976fb300ea9815f5010"><div class="ttname"><a href="zlib_8h.html#aa4751fbf6d882976fb300ea9815f5010">z_stream</a></div><div class="ttdeci">struct z_stream_s z_stream</div></div>
|
|
<div class="ttc" id="azlib_8h_html_a19880e07a77d10515147e23b6379dd49"><div class="ttname"><a href="zlib_8h.html#a19880e07a77d10515147e23b6379dd49">z_stream_s::next_in</a></div><div class="ttdeci">Bytef * next_in</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00086">zlib.h:86</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_structgz__header__s"><div class="ttname"><a href="zlib_8h.html#structgz__header__s">gz_header_s</a></div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00112">zlib.h:112</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_aef6ee0fd51b4998d5eae9ffe4e44306c"><div class="ttname"><a href="zconf_8h.html#aef6ee0fd51b4998d5eae9ffe4e44306c">voidp</a></div><div class="ttdeci">void * voidp</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00352">zconf.h:352</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_af5b7779d893562b8e759efd582d4fcba"><div class="ttname"><a href="zlib_8h.html#af5b7779d893562b8e759efd582d4fcba">gz_header_s::name_max</a></div><div class="ttdeci">uInt name_max</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00121">zlib.h:121</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_a181415878f03b95a7094309d824a14b6"><div class="ttname"><a href="zconf_8h.html#a181415878f03b95a7094309d824a14b6">ZEXPORT</a></div><div class="ttdeci">#define ZEXPORT</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00322">zconf.h:322</a></div></div>
|
|
<div class="ttc" id="azconf_8h_html_a87d141052bcd5ec8a80812a565c70369"><div class="ttname"><a href="zconf_8h.html#a87d141052bcd5ec8a80812a565c70369">uInt</a></div><div class="ttdeci">unsigned int uInt</div><div class="ttdef"><b>Definition:</b> <a href="zconf_8h_source.html#l00335">zconf.h:335</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a7587bb1e332fc8f57ef74071eeec8070"><div class="ttname"><a href="zlib_8h.html#a7587bb1e332fc8f57ef74071eeec8070">z_stream_s::zfree</a></div><div class="ttdeci">free_func zfree</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00098">zlib.h:98</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_structinternal__state"><div class="ttname"><a href="zlib_8h.html#structinternal__state">internal_state</a></div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l01600">zlib.h:1600</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_acb727b700580681a32b288d9ebc9b762"><div class="ttname"><a href="zlib_8h.html#acb727b700580681a32b288d9ebc9b762">gz_header_s::text</a></div><div class="ttdeci">int text</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00113">zlib.h:113</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_aa301948b62e927cb5b34c7fa48b369e7"><div class="ttname"><a href="zlib_8h.html#aa301948b62e927cb5b34c7fa48b369e7">z_stream_s::total_in</a></div><div class="ttdeci">uLong total_in</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00088">zlib.h:88</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_a5ded8c4f212b31a3ad229496d74f1239"><div class="ttname"><a href="zlib_8h.html#a5ded8c4f212b31a3ad229496d74f1239">gz_header_s::extra_len</a></div><div class="ttdeci">uInt extra_len</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00118">zlib.h:118</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_aaf14708cee6cfc16ac27f3cff686f8d8"><div class="ttname"><a href="zlib_8h.html#aaf14708cee6cfc16ac27f3cff686f8d8">z_stream_s::avail_out</a></div><div class="ttdeci">uInt avail_out</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00091">zlib.h:91</a></div></div>
|
|
<div class="ttc" id="azlib_8h_html_ae3bf2150b8009b089ae6878004146180"><div class="ttname"><a href="zlib_8h.html#ae3bf2150b8009b089ae6878004146180">z_stream_s::reserved</a></div><div class="ttdeci">uLong reserved</div><div class="ttdef"><b>Definition:</b> <a href="zlib_8h_source.html#l00103">zlib.h:103</a></div></div>
|
|
<!-- 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.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|