Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

inftrees.h

00001 /* inftrees.h -- header to use inftrees.c
00002  * Copyright (C) 1995-1998 Mark Adler
00003  * For conditions of distribution and use, see copyright notice in zlib.h 
00004  */
00005 
00006 /* WARNING: this file should *not* be used by applications. It is
00007    part of the implementation of the compression library and is
00008    subject to change. Applications should only use zlib.h.
00009  */
00010 
00011 /* Huffman code lookup table entry--this entry is four bytes for machines
00012    that have 16-bit pointers (e.g. PC's in the small or medium model). */
00013 
00014 typedef struct inflate_huft_s FAR inflate_huft;
00015 
00016 struct inflate_huft_s {
00017   union {
00018     struct {
00019       Byte Exop;        /* number of extra bits or operation */
00020       Byte Bits;        /* number of bits in this code or subcode */
00021     } what;
00022     uInt pad;           /* pad structure to a power of 2 (4 bytes for */
00023   } word;               /*  16-bit, 8 bytes for 32-bit int's) */
00024   uInt base;            /* literal, length base, distance base,
00025                            or table offset */
00026 };
00027 
00028 /* Maximum size of dynamic tree.  The maximum found in a long but non-
00029    exhaustive search was 1004 huft structures (850 for length/literals
00030    and 154 for distances, the latter actually the result of an
00031    exhaustive search).  The actual maximum is not known, but the
00032    value below is more than safe. */
00033 #define MANY 1440
00034 
00035 extern int inflate_trees_bits OF((
00036     uIntf *,                    /* 19 code lengths */
00037     uIntf *,                    /* bits tree desired/actual depth */
00038     inflate_huft * FAR *,       /* bits tree result */
00039     inflate_huft *,             /* space for trees */
00040     z_streamp));                /* for messages */
00041 
00042 extern int inflate_trees_dynamic OF((
00043     uInt,                       /* number of literal/length codes */
00044     uInt,                       /* number of distance codes */
00045     uIntf *,                    /* that many (total) code lengths */
00046     uIntf *,                    /* literal desired/actual bit depth */
00047     uIntf *,                    /* distance desired/actual bit depth */
00048     inflate_huft * FAR *,       /* literal/length tree result */
00049     inflate_huft * FAR *,       /* distance tree result */
00050     inflate_huft *,             /* space for trees */
00051     z_streamp));                /* for messages */
00052 
00053 extern int inflate_trees_fixed OF((
00054     uIntf *,                    /* literal desired/actual bit depth */
00055     uIntf *,                    /* distance desired/actual bit depth */
00056     inflate_huft * FAR *,       /* literal/length tree result */
00057     inflate_huft * FAR *,       /* distance tree result */
00058     z_streamp));                /* for memory allocation */

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by doxygen1.2.15