1 /* inftrees.h -- header to use inftrees.c
2 * Copyright (C) 1995-1996 Mark Adler
3 * For conditions of distribution and use, see copyright notice in zlib.h
6 /* WARNING: this file should *not* be used by applications. It is
7 part of the implementation of the compression library and is
8 subject to change. Applications should only use zlib.h.
11 /* Huffman code lookup table entry--this entry is four bytes for machines
12 that have 16-bit pointers (e.g. PC's in the small or medium model). */
14 typedef struct inflate_huft_s FAR inflate_huft;
16 struct inflate_huft_s {
19 Byte Exop; /* number of extra bits or operation */
20 Byte Bits; /* number of bits in this code or subcode */
22 Bytef *pad; /* pad structure to a power of 2 (4 bytes for */
23 } word; /* 16-bit, 8 bytes for 32-bit machines) */
25 uInt Base; /* literal, length base, or distance base */
26 inflate_huft *Next; /* pointer to next level of table */
31 extern uInt inflate_hufts;
34 extern int inflate_trees_bits OF((
35 uIntf *, /* 19 code lengths */
36 uIntf *, /* bits tree desired/actual depth */
37 inflate_huft * FAR *, /* bits tree result */
38 z_stream *)); /* for zalloc, zfree functions */
40 extern int inflate_trees_dynamic OF((
41 uInt, /* number of literal/length codes */
42 uInt, /* number of distance codes */
43 uIntf *, /* that many (total) code lengths */
44 uIntf *, /* literal desired/actual bit depth */
45 uIntf *, /* distance desired/actual bit depth */
46 inflate_huft * FAR *, /* literal/length tree result */
47 inflate_huft * FAR *, /* distance tree result */
48 z_stream *)); /* for zalloc, zfree functions */
50 extern int inflate_trees_fixed OF((
51 uIntf *, /* literal desired/actual bit depth */
52 uIntf *, /* distance desired/actual bit depth */
53 inflate_huft * FAR *, /* literal/length tree result */
54 inflate_huft * FAR *)); /* distance tree result */
56 extern int inflate_trees_free OF((
57 inflate_huft *, /* tables to free */
58 z_stream *)); /* for zfree function */