| 1 | /* |
|---|
| 2 | * $Id: //suprahd/releases/suprahd_163/suprahd_ztvapp640_163/drivers/graphics/ZLIB/inftrees.h#1 $ |
|---|
| 3 | * $Revision: #1 $ |
|---|
| 4 | * $DateTime: 2006/02/24 17:51:46 $ |
|---|
| 5 | * $Change: 42566 $ |
|---|
| 6 | * $Author: pryush.sharma $ |
|---|
| 7 | */ |
|---|
| 8 | |
|---|
| 9 | /* inftrees.h -- header to use inftrees.c |
|---|
| 10 | * Copyright (C) 1995-1998 Mark Adler |
|---|
| 11 | * For conditions of distribution and use, see copyright notice in zlib.h |
|---|
| 12 | */ |
|---|
| 13 | |
|---|
| 14 | /* WARNING: this file should *not* be used by applications. It is |
|---|
| 15 | part of the implementation of the compression library and is |
|---|
| 16 | subject to change. Applications should only use zlib.h. |
|---|
| 17 | */ |
|---|
| 18 | |
|---|
| 19 | /* Huffman code lookup table entry--this entry is four bytes for machines |
|---|
| 20 | that have 16-bit pointers (e.g. PC's in the small or medium model). */ |
|---|
| 21 | |
|---|
| 22 | typedef struct inflate_huft_s FAR inflate_huft; |
|---|
| 23 | |
|---|
| 24 | struct inflate_huft_s { |
|---|
| 25 | union { |
|---|
| 26 | struct { |
|---|
| 27 | Byte Exop; /* number of extra bits or operation */ |
|---|
| 28 | Byte Bits; /* number of bits in this code or subcode */ |
|---|
| 29 | } what; |
|---|
| 30 | uInt pad; /* pad structure to a power of 2 (4 bytes for */ |
|---|
| 31 | } word; /* 16-bit, 8 bytes for 32-bit int's) */ |
|---|
| 32 | uInt base; /* literal, length base, distance base, |
|---|
| 33 | or table offset */ |
|---|
| 34 | }; |
|---|
| 35 | |
|---|
| 36 | /* Maximum size of dynamic tree. The maximum found in a long but non- |
|---|
| 37 | exhaustive search was 1004 huft structures (850 for length/literals |
|---|
| 38 | and 154 for distances, the latter actually the result of an |
|---|
| 39 | exhaustive search). The actual maximum is not known, but the |
|---|
| 40 | value below is more than safe. */ |
|---|
| 41 | #define MANY 1440 |
|---|
| 42 | |
|---|
| 43 | extern int inflate_trees_bits OF(( |
|---|
| 44 | uIntf *, /* 19 code lengths */ |
|---|
| 45 | uIntf *, /* bits tree desired/actual depth */ |
|---|
| 46 | inflate_huft * FAR *, /* bits tree result */ |
|---|
| 47 | inflate_huft *, /* space for trees */ |
|---|
| 48 | z_streamp)); /* for messages */ |
|---|
| 49 | |
|---|
| 50 | extern int inflate_trees_dynamic OF(( |
|---|
| 51 | uInt, /* number of literal/length codes */ |
|---|
| 52 | uInt, /* number of distance codes */ |
|---|
| 53 | uIntf *, /* that many (total) code lengths */ |
|---|
| 54 | uIntf *, /* literal desired/actual bit depth */ |
|---|
| 55 | uIntf *, /* distance desired/actual bit depth */ |
|---|
| 56 | inflate_huft * FAR *, /* literal/length tree result */ |
|---|
| 57 | inflate_huft * FAR *, /* distance tree result */ |
|---|
| 58 | inflate_huft *, /* space for trees */ |
|---|
| 59 | z_streamp)); /* for messages */ |
|---|
| 60 | |
|---|
| 61 | extern int inflate_trees_fixed OF(( |
|---|
| 62 | uIntf *, /* literal desired/actual bit depth */ |
|---|
| 63 | uIntf *, /* distance desired/actual bit depth */ |
|---|
| 64 | inflate_huft * FAR *, /* literal/length tree result */ |
|---|
| 65 | inflate_huft * FAR *, /* distance tree result */ |
|---|
| 66 | z_streamp)); /* for memory allocation */ |
|---|