MRPT  1.9.9
inftrees.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 /* WARNING: this file should *not* be used by applications. It is
11  part of the implementation of the compression library and is
12  subject to change. Applications should only use zlib.h.
13  */
14 
15 /* Structure for decoding tables. Each entry provides either the
16  information needed to do the operation requested by the code that
17  indexed that table entry, or it provides a pointer to another
18  table that indexes more bits of the code. op indicates whether
19  the entry is a pointer to another table, a literal, a length or
20  distance, an end-of-block, or an invalid code. For a table
21  pointer, the low four bits of op is the number of index bits of
22  that table. For a length or distance, the low four bits of op
23  is the number of extra bits to get after the code. bits is
24  the number of bits in this code or part of the code to drop off
25  of the bit buffer. val is the actual byte to output in the case
26  of a literal, the base length or distance, or the offset from
27  the current table to the next table. Each entry is four bytes. */
28 typedef struct
29 {
30  unsigned char op; /* operation, extra bits, table bits */
31  unsigned char bits; /* bits in this part of the code */
32  unsigned short val; /* offset in table or code value */
33 } code;
34 
35 /* op values as set by inflate_table():
36  00000000 - literal
37  0000tttt - table link, tttt != 0 is the number of table index bits
38  0001eeee - length or distance, eeee is the number of extra bits
39  01100000 - end of block
40  01000000 - invalid code
41  */
42 
43 /* Maximum size of dynamic tree. The maximum found in a long but non-
44  exhaustive search was 1444 code structures (852 for length/literals
45  and 592 for distances, the latter actually the result of an
46  exhaustive search). The true maximum is not known, but the value
47  below is more than safe. */
48 #define ENOUGH 2048
49 #define MAXD 592
50 
51 /* Type of code to build for inftable() */
52 typedef enum
53 {
57 } codetype;
58 
59 extern int inflate_table
60  OF((codetype type, unsigned short FAR* lens, unsigned codes,
61  code FAR* FAR* table, unsigned FAR* bits, unsigned short FAR* work));
unsigned short val
Definition: inftrees.h:32
Definition: inftrees.h:56
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:3535
unsigned char op
Definition: inftrees.h:30
int inflate_table OF((codetype type, unsigned short FAR *lens, unsigned codes, code FAR *FAR *table, unsigned FAR *bits, unsigned short FAR *work))
Definition: inftrees.h:54
unsigned char bits
Definition: inftrees.h:31
codetype
Definition: inftrees.h:52
Definition: inftrees.h:28
Definition: inftrees.h:55
#define FAR
Definition: zconf.h:261
GLuint GLuint GLsizei GLenum type
Definition: glext.h:3532



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ee555d257 Fri Aug 16 10:05:39 2019 +0200 at vie ago 16 10:10:14 CEST 2019