comparison zlib/inftrees.h @ 2690:9ef72ee5c0b0

Update vendored zlib to 1.3.1
author Michael Pavone <pavone@retrodev.com>
date Sun, 15 Jun 2025 15:39:33 -0700
parents 00d788dac91a
children
comparison
equal deleted inserted replaced
2689:bd6e33de0972 2690:9ef72ee5c0b0
36 */ 36 */
37 37
38 /* Maximum size of the dynamic table. The maximum number of code structures is 38 /* Maximum size of the dynamic table. The maximum number of code structures is
39 1444, which is the sum of 852 for literal/length codes and 592 for distance 39 1444, which is the sum of 852 for literal/length codes and 592 for distance
40 codes. These values were found by exhaustive searches using the program 40 codes. These values were found by exhaustive searches using the program
41 examples/enough.c found in the zlib distribtution. The arguments to that 41 examples/enough.c found in the zlib distribution. The arguments to that
42 program are the number of symbols, the initial root table size, and the 42 program are the number of symbols, the initial root table size, and the
43 maximum bit length of a code. "enough 286 9 15" for literal/length codes 43 maximum bit length of a code. "enough 286 9 15" for literal/length codes
44 returns returns 852, and "enough 30 6 15" for distance codes returns 592. 44 returns 852, and "enough 30 6 15" for distance codes returns 592. The
45 The initial root table size (9 or 6) is found in the fifth argument of the 45 initial root table size (9 or 6) is found in the fifth argument of the
46 inflate_table() calls in inflate.c and infback.c. If the root table size is 46 inflate_table() calls in inflate.c and infback.c. If the root table size is
47 changed, then these maximum sizes would be need to be recalculated and 47 changed, then these maximum sizes would be need to be recalculated and
48 updated. */ 48 updated. */
49 #define ENOUGH_LENS 852 49 #define ENOUGH_LENS 852
50 #define ENOUGH_DISTS 592 50 #define ENOUGH_DISTS 592
55 CODES, 55 CODES,
56 LENS, 56 LENS,
57 DISTS 57 DISTS
58 } codetype; 58 } codetype;
59 59
60 int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, 60 int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
61 unsigned codes, code FAR * FAR *table, 61 unsigned codes, code FAR * FAR *table,
62 unsigned FAR *bits, unsigned short FAR *work)); 62 unsigned FAR *bits, unsigned short FAR *work);