inftrees.h revision 17651
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 4 */ 5 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. 9 */ 10 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). */ 13 14typedef struct inflate_huft_s FAR inflate_huft; 15 16struct inflate_huft_s { 17 union { 18 struct { 19 Byte Exop; /* number of extra bits or operation */ 20 Byte Bits; /* number of bits in this code or subcode */ 21 } what; 22 Bytef *pad; /* pad structure to a power of 2 (4 bytes for */ 23 } word; /* 16-bit, 8 bytes for 32-bit machines) */ 24 union { 25 uInt Base; /* literal, length base, or distance base */ 26 inflate_huft *Next; /* pointer to next level of table */ 27 } more; 28}; 29 30#ifdef DEBUG 31 extern uInt inflate_hufts; 32#endif 33 34extern 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_streamp )); /* for zalloc, zfree functions */ 39 40extern 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_streamp )); /* for zalloc, zfree functions */ 49 50extern 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 */ 55 56extern int inflate_trees_free OF(( 57 inflate_huft *, /* tables to free */ 58 z_streamp )); /* for zfree function */ 59 60