Debian Codegraph @

src/lib/inflate64_config.h

raw symbols SCIP
1 //
2 // Created by miurahr on 22/06/28.
3 //
4
5 #ifndef DEFLATE9_INFLATE64_CONFIG_H
6 #define DEFLATE9_INFLATE64_CONFIG_H
7
8 /* common constants */
9
10 #define STORED_BLOCK 0
11 #define STATIC_TREES 1
12 #define DYN_TREES 2
13 /* The three kinds of block type */
14
15 #define MIN_MATCH 3
16 #define BASE_MATCH 258
17 #define MAX_MATCH 65530 /* < 1<<WBITS64 - MINMATCH -1 */
18 /* The minimum and maximum match lengths */
19
20 #define MEM_LEVEL64 9 /* maximum compression */
21 #define WBITS64 16 /* 64K LZ77 window for deflate64 */
22
23 #define MAX_BITS 15
24 /* All codes must not exceed MAX_BITS bits */
25
26 #ifdef __STDC__
27 #ifndef STDC
28 #define STDC
29 #endif
30 #endif
31
32 /* Type declarations */
33
34 #ifndef OF /* function prototypes */
35 # ifdef STDC
36 # define OF(args) args
37 # else
38 # define OF(args) ()
39 # endif
40 #endif
41
42 #ifndef ZEXTERN
43 # define ZEXTERN extern
44 #endif
45 #ifndef ZEXPORT
46 # define ZEXPORT
47 #endif
48 #ifndef ZEXPORTVA
49 # define ZEXPORTVA
50 #endif
51
52 #ifndef FAR
53 # define FAR
54 #endif
55
56 #define z_const const
57
58 typedef unsigned char uch;
59 typedef unsigned short ush;
60 typedef unsigned long ulg;
61
62 #if !defined(__MACTYPES__)
63 typedef unsigned char Byte; /* 8 bits */
64 #endif
65 typedef unsigned int uInt; /* 16 bits or more */
66 typedef unsigned long uLong; /* 32 bits or more */
67
68 #ifdef STDC
69 typedef void const *voidpc;
70 typedef void FAR *voidpf;
71 typedef void *voidp;
72 #else
73 typedef Byte const *voidpc;
74 typedef Byte FAR *voidpf;
75 typedef Byte *voidp;
76 #endif
77
78 #ifdef _WIN32
79 #include <stddef.h> /* for wchar_t */
80 #endif
81
82 #ifndef z_off_t
83 # define z_off_t long
84 #endif
85
86 /* MVS linker does not support external names larger than 8 bytes */
87 #if defined(__MVS__)
88 #pragma map(deflate9Init_,"DEIN")
89 #pragma map(deflate9Init2_,"DEIN2")
90 #pragma map(deflate9End,"DEEND")
91 #pragma map(inflate9Init_,"ININ")
92 #pragma map(inflate9Init2_,"ININ2")
93 #pragma map(inflate9End,"INEND")
94 #endif
95 typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
96 typedef void (*free_func) OF((voidpf opaque, voidpf address));
97
98 struct internal_state;
99
100 typedef struct z_stream_s {
101 z_const Byte FAR *next_in; /* next input byte */
102 uInt avail_in; /* number of bytes available at next_in */
103 uLong total_in; /* total number of input bytes read so far */
104
105 Byte FAR *next_out; /* next output byte will go here */
106 uInt avail_out; /* remaining free space at next_out */
107 uLong total_out; /* total number of bytes output so far */
108
109 z_const char *msg; /* last error message, NULL if no error */
110 struct internal_state FAR *state; /* not visible by applications */
111
112 alloc_func zalloc; /* used to allocate the internal state */
113 free_func zfree; /* used to free the internal state */
114 voidpf opaque; /* private data object passed to zalloc and zfree */
115
116 int data_type; /* best guess about the data type: binary or text
117 for deflate, or the decoding state for inflate */
118 uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */
119 uLong reserved; /* reserved for future use */
120 } z_stream;
121
122 typedef z_stream FAR *z_streamp;
123
124 /* constants */
125
126 #define Z_NO_FLUSH 0
127 #define Z_FINISH 4
128 /* Allowed flush values; see deflate() and inflate() below for details */
129
130 #define Z_OK 0
131 #define Z_STREAM_END 1
132 #define Z_NEED_DICT 2
133 #define Z_ERRNO (-1)
134 #define Z_STREAM_ERROR (-2)
135 #define Z_DATA_ERROR (-3)
136 #define Z_MEM_ERROR (-4)
137 #define Z_BUF_ERROR (-5)
138 /* constants */
139
140 #define Z_NO_FLUSH 0
141 #define Z_PARTIAL_FLUSH 1
142 #define Z_SYNC_FLUSH 2
143 #define Z_FULL_FLUSH 3
144 #define Z_FINISH 4
145 #define Z_BLOCK 5
146 #define Z_TREES 6
147 /* Allowed flush values; see deflate() and inflate() below for details */
148
149 #define Z_OK 0
150 #define Z_STREAM_END 1
151 #define Z_NEED_DICT 2
152 #define Z_ERRNO (-1)
153 #define Z_STREAM_ERROR (-2)
154 #define Z_DATA_ERROR (-3)
155 #define Z_MEM_ERROR (-4)
156 #define Z_BUF_ERROR (-5)
157
158 #define Z_NULL 0
159
160 #define Z_FIXED 4
161 /* compression strategy */
162
163 #define Z_BINARY 0
164 #define Z_TEXT 1
165 #define Z_UNKNOWN 2
166 /* Possible values of the data_type field for deflate() */
167
168 #ifdef HAVE_HIDDEN
169 # define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
170 #else
171 # define ZLIB_INTERNAL
172 #endif
173
174 #ifndef local
175 # define local static
176 #endif
177 /* since "static" is used to mean two completely different things in C, we
178 define "local" for the non-static meaning of "static", for readability
179 (compile with -Dlocal if your debugger can't find static symbols) */
180
181 #if defined(STDC) && !defined(Z_SOLO)
182 # if !defined(_MSC_VER)
183 # include <stddef.h>
184 # endif
185 # include <string.h>
186 # include <stdlib.h>
187 #endif
188
189 #endif //DEFLATE9_INFLATE64_CONFIG_H