<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>inftrees.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.15 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center>
<hr><h1>inftrees.h</h1><div class="fragment"><pre>00001 <font class="comment">/* inftrees.h -- header to use inftrees.c</font>
00002 <font class="comment"> * Copyright (C) 1995-1998 Mark Adler</font>
00003 <font class="comment"> * For conditions of distribution and use, see copyright notice in zlib.h </font>
00004 <font class="comment"> */</font>
00005
00006 <font class="comment">/* WARNING: this file should *not* be used by applications. It is</font>
00007 <font class="comment"> part of the implementation of the compression library and is</font>
00008 <font class="comment"> subject to change. Applications should only use zlib.h.</font>
00009 <font class="comment"> */</font>
00010
00011 <font class="comment">/* Huffman code lookup table entry--this entry is four bytes for machines</font>
00012 <font class="comment"> that have 16-bit pointers (e.g. PC's in the small or medium model). */</font>
00013
00014 <font class="keyword">typedef</font> <font class="keyword">struct </font>inflate_huft_s FAR inflate_huft;
00015
00016 <font class="keyword">struct </font>inflate_huft_s {
00017 <font class="keyword">union </font>{
00018 <font class="keyword">struct </font>{
00019 Byte Exop; <font class="comment">/* number of extra bits or operation */</font>
00020 Byte Bits; <font class="comment">/* number of bits in this code or subcode */</font>
00021 } what;
00022 uInt pad; <font class="comment">/* pad structure to a power of 2 (4 bytes for */</font>
00023 } word; <font class="comment">/* 16-bit, 8 bytes for 32-bit int's) */</font>
00024 uInt base; <font class="comment">/* literal, length base, distance base,</font>
00025 <font class="comment"> or table offset */</font>
00026 };
00027
00028 <font class="comment">/* Maximum size of dynamic tree. The maximum found in a long but non-</font>
00029 <font class="comment"> exhaustive search was 1004 huft structures (850 for length/literals</font>
00030 <font class="comment"> and 154 for distances, the latter actually the result of an</font>
00031 <font class="comment"> exhaustive search). The actual maximum is not known, but the</font>
00032 <font class="comment"> value below is more than safe. */</font>
00033 <font class="preprocessor">#define MANY 1440</font>
00034 <font class="preprocessor"></font>
00035 <font class="keyword">extern</font> <font class="keywordtype">int</font> inflate_trees_bits OF((
00036 uIntf *, <font class="comment">/* 19 code lengths */</font>
00037 uIntf *, <font class="comment">/* bits tree desired/actual depth */</font>
00038 inflate_huft * FAR *, <font class="comment">/* bits tree result */</font>
00039 inflate_huft *, <font class="comment">/* space for trees */</font>
00040 z_streamp)); <font class="comment">/* for messages */</font>
00041
00042 <font class="keyword">extern</font> <font class="keywordtype">int</font> inflate_trees_dynamic OF((
00043 uInt, <font class="comment">/* number of literal/length codes */</font>
00044 uInt, <font class="comment">/* number of distance codes */</font>
00045 uIntf *, <font class="comment">/* that many (total) code lengths */</font>
00046 uIntf *, <font class="comment">/* literal desired/actual bit depth */</font>
00047 uIntf *, <font class="comment">/* distance desired/actual bit depth */</font>
00048 inflate_huft * FAR *, <font class="comment">/* literal/length tree result */</font>
00049 inflate_huft * FAR *, <font class="comment">/* distance tree result */</font>
00050 inflate_huft *, <font class="comment">/* space for trees */</font>
00051 z_streamp)); <font class="comment">/* for messages */</font>
00052
00053 <font class="keyword">extern</font> <font class="keywordtype">int</font> inflate_trees_fixed OF((
00054 uIntf *, <font class="comment">/* literal desired/actual bit depth */</font>
00055 uIntf *, <font class="comment">/* distance desired/actual bit depth */</font>
00056 inflate_huft * FAR *, <font class="comment">/* literal/length tree result */</font>
00057 inflate_huft * FAR *, <font class="comment">/* distance tree result */</font>
00058 z_streamp)); <font class="comment">/* for memory allocation */</font>
</pre></div><hr><address align="right"><small>Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.2.15 </small></address>
</body>
</html>