Main MRPT website > C++ reference for MRPT 1.5.9
inftrees.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://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  unsigned char op; /* operation, extra bits, table bits */
30  unsigned char bits; /* bits in this part of the code */
31  unsigned short val; /* offset in table or code value */
32 } code;
33 
34 /* op values as set by inflate_table():
35  00000000 - literal
36  0000tttt - table link, tttt != 0 is the number of table index bits
37  0001eeee - length or distance, eeee is the number of extra bits
38  01100000 - end of block
39  01000000 - invalid code
40  */
41 
42 /* Maximum size of dynamic tree. The maximum found in a long but non-
43  exhaustive search was 1444 code structures (852 for length/literals
44  and 592 for distances, the latter actually the result of an
45  exhaustive search). The true maximum is not known, but the value
46  below is more than safe. */
47 #define ENOUGH 2048
48 #define MAXD 592
49 
50 /* Type of code to build for inftable() */
51 typedef enum {
55 } codetype;
56 
57 extern int inflate_table OF((codetype type, unsigned short FAR *lens,
58  unsigned codes, code FAR * FAR *table,
59  unsigned FAR *bits, unsigned short FAR *work));
unsigned short val
Definition: inftrees.h:31
Definition: inftrees.h:54
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:3513
unsigned char op
Definition: inftrees.h:29
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:52
unsigned char bits
Definition: inftrees.h:30
codetype
Definition: inftrees.h:51
Definition: inftrees.h:28
Definition: inftrees.h:53
#define FAR
Definition: zconf.h:261
GLuint GLuint GLsizei GLenum type
Definition: glext.h:3512



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020