1pub use bindings::*;
2
3#[cfg(feature = "regenerate-bindings")]
4pub mod bindings {
5 include!(concat!(env!("OUT_DIR"), "/igzip_lib.rs"));
6}
7
8#[cfg(not(feature = "regenerate-bindings"))]
10pub mod bindings {
11 pub const _STDINT_H: u32 = 1;
14 pub const _FEATURES_H: u32 = 1;
15 pub const _DEFAULT_SOURCE: u32 = 1;
16 pub const __GLIBC_USE_ISOC2X: u32 = 0;
17 pub const __USE_ISOC11: u32 = 1;
18 pub const __USE_ISOC99: u32 = 1;
19 pub const __USE_ISOC95: u32 = 1;
20 pub const __USE_POSIX_IMPLICITLY: u32 = 1;
21 pub const _POSIX_SOURCE: u32 = 1;
22 pub const _POSIX_C_SOURCE: u32 = 200809;
23 pub const __USE_POSIX: u32 = 1;
24 pub const __USE_POSIX2: u32 = 1;
25 pub const __USE_POSIX199309: u32 = 1;
26 pub const __USE_POSIX199506: u32 = 1;
27 pub const __USE_XOPEN2K: u32 = 1;
28 pub const __USE_XOPEN2K8: u32 = 1;
29 pub const _ATFILE_SOURCE: u32 = 1;
30 pub const __WORDSIZE: u32 = 64;
31 pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
32 pub const __SYSCALL_WORDSIZE: u32 = 64;
33 pub const __TIMESIZE: u32 = 64;
34 pub const __USE_TIME_BITS64: u32 = 1;
35 pub const __USE_MISC: u32 = 1;
36 pub const __USE_ATFILE: u32 = 1;
37 pub const __USE_FORTIFY_LEVEL: u32 = 0;
38 pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
39 pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
40 pub const __GLIBC_USE_C2X_STRTOL: u32 = 0;
41 pub const _STDC_PREDEF_H: u32 = 1;
42 pub const __STDC_IEC_559__: u32 = 1;
43 pub const __STDC_IEC_60559_BFP__: u32 = 201404;
44 pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
45 pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
46 pub const __STDC_ISO_10646__: u32 = 201706;
47 pub const __GNU_LIBRARY__: u32 = 6;
48 pub const __GLIBC__: u32 = 2;
49 pub const __GLIBC_MINOR__: u32 = 39;
50 pub const _SYS_CDEFS_H: u32 = 1;
51 pub const __glibc_c99_flexarr_available: u32 = 1;
52 pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
53 pub const __HAVE_GENERIC_SELECTION: u32 = 1;
54 pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
55 pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
56 pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
57 pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
58 pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
59 pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
60 pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
61 pub const _BITS_TYPES_H: u32 = 1;
62 pub const _BITS_TYPESIZES_H: u32 = 1;
63 pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
64 pub const __INO_T_MATCHES_INO64_T: u32 = 1;
65 pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
66 pub const __STATFS_MATCHES_STATFS64: u32 = 1;
67 pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
68 pub const __FD_SETSIZE: u32 = 1024;
69 pub const _BITS_TIME64_H: u32 = 1;
70 pub const _BITS_WCHAR_H: u32 = 1;
71 pub const _BITS_STDINT_INTN_H: u32 = 1;
72 pub const _BITS_STDINT_UINTN_H: u32 = 1;
73 pub const _BITS_STDINT_LEAST_H: u32 = 1;
74 pub const INT8_MIN: i32 = -128;
75 pub const INT16_MIN: i32 = -32768;
76 pub const INT32_MIN: i32 = -2147483648;
77 pub const INT8_MAX: u32 = 127;
78 pub const INT16_MAX: u32 = 32767;
79 pub const INT32_MAX: u32 = 2147483647;
80 pub const UINT8_MAX: u32 = 255;
81 pub const UINT16_MAX: u32 = 65535;
82 pub const UINT32_MAX: u32 = 4294967295;
83 pub const INT_LEAST8_MIN: i32 = -128;
84 pub const INT_LEAST16_MIN: i32 = -32768;
85 pub const INT_LEAST32_MIN: i32 = -2147483648;
86 pub const INT_LEAST8_MAX: u32 = 127;
87 pub const INT_LEAST16_MAX: u32 = 32767;
88 pub const INT_LEAST32_MAX: u32 = 2147483647;
89 pub const UINT_LEAST8_MAX: u32 = 255;
90 pub const UINT_LEAST16_MAX: u32 = 65535;
91 pub const UINT_LEAST32_MAX: u32 = 4294967295;
92 pub const INT_FAST8_MIN: i32 = -128;
93 pub const INT_FAST16_MIN: i64 = -9223372036854775808;
94 pub const INT_FAST32_MIN: i64 = -9223372036854775808;
95 pub const INT_FAST8_MAX: u32 = 127;
96 pub const INT_FAST16_MAX: u64 = 9223372036854775807;
97 pub const INT_FAST32_MAX: u64 = 9223372036854775807;
98 pub const UINT_FAST8_MAX: u32 = 255;
99 pub const UINT_FAST16_MAX: i32 = -1;
100 pub const UINT_FAST32_MAX: i32 = -1;
101 pub const INTPTR_MIN: i64 = -9223372036854775808;
102 pub const INTPTR_MAX: u64 = 9223372036854775807;
103 pub const UINTPTR_MAX: i32 = -1;
104 pub const PTRDIFF_MIN: i64 = -9223372036854775808;
105 pub const PTRDIFF_MAX: u64 = 9223372036854775807;
106 pub const SIG_ATOMIC_MIN: i32 = -2147483648;
107 pub const SIG_ATOMIC_MAX: u32 = 2147483647;
108 pub const SIZE_MAX: i32 = -1;
109 pub const WINT_MIN: u32 = 0;
110 pub const WINT_MAX: u32 = 4294967295;
111 pub const IGZIP_K: u32 = 1024;
112 pub const ISAL_DEF_MAX_HDR_SIZE: u32 = 328;
113 pub const ISAL_DEF_MAX_CODE_LEN: u32 = 15;
114 pub const ISAL_DEF_HIST_SIZE: u32 = 32768;
115 pub const ISAL_DEF_MAX_HIST_BITS: u32 = 15;
116 pub const ISAL_DEF_MAX_MATCH: u32 = 258;
117 pub const ISAL_DEF_MIN_MATCH: u32 = 3;
118 pub const ISAL_DEF_LIT_SYMBOLS: u32 = 257;
119 pub const ISAL_DEF_LEN_SYMBOLS: u32 = 29;
120 pub const ISAL_DEF_DIST_SYMBOLS: u32 = 30;
121 pub const ISAL_DEF_LIT_LEN_SYMBOLS: u32 = 286;
122 pub const ISAL_LOOK_AHEAD: u32 = 288;
123 pub const IGZIP_HIST_SIZE: u32 = 32768;
124 pub const IGZIP_HASH8K_HASH_SIZE: u32 = 8192;
125 pub const IGZIP_HASH_HIST_SIZE: u32 = 32768;
126 pub const IGZIP_HASH_MAP_HASH_SIZE: u32 = 32768;
127 pub const IGZIP_LVL0_HASH_SIZE: u32 = 8192;
128 pub const IGZIP_LVL1_HASH_SIZE: u32 = 8192;
129 pub const IGZIP_LVL2_HASH_SIZE: u32 = 32768;
130 pub const IGZIP_LVL3_HASH_SIZE: u32 = 32768;
131 pub const IGZIP_HUFFTABLE_CUSTOM: u32 = 0;
132 pub const IGZIP_HUFFTABLE_DEFAULT: u32 = 1;
133 pub const IGZIP_HUFFTABLE_STATIC: u32 = 2;
134 pub const NO_FLUSH: u32 = 0;
135 pub const SYNC_FLUSH: u32 = 1;
136 pub const FULL_FLUSH: u32 = 2;
137 pub const FINISH_FLUSH: u32 = 0;
138 pub const IGZIP_DEFLATE: u32 = 0;
139 pub const IGZIP_GZIP: u32 = 1;
140 pub const IGZIP_GZIP_NO_HDR: u32 = 2;
141 pub const IGZIP_ZLIB: u32 = 3;
142 pub const IGZIP_ZLIB_NO_HDR: u32 = 4;
143 pub const COMP_OK: u32 = 0;
144 pub const INVALID_FLUSH: i32 = -7;
145 pub const INVALID_PARAM: i32 = -8;
146 pub const STATELESS_OVERFLOW: i32 = -1;
147 pub const ISAL_INVALID_OPERATION: i32 = -9;
148 pub const ISAL_INVALID_STATE: i32 = -3;
149 pub const ISAL_INVALID_LEVEL: i32 = -4;
150 pub const ISAL_INVALID_LEVEL_BUF: i32 = -5;
151 pub const ISAL_DECODE_LONG_BITS: u32 = 12;
152 pub const ISAL_DECODE_SHORT_BITS: u32 = 10;
153 pub const ISAL_DEFLATE: u32 = 0;
154 pub const ISAL_GZIP: u32 = 1;
155 pub const ISAL_GZIP_NO_HDR: u32 = 2;
156 pub const ISAL_ZLIB: u32 = 3;
157 pub const ISAL_ZLIB_NO_HDR: u32 = 4;
158 pub const ISAL_ZLIB_NO_HDR_VER: u32 = 5;
159 pub const ISAL_GZIP_NO_HDR_VER: u32 = 6;
160 pub const ISAL_DECOMP_OK: u32 = 0;
161 pub const ISAL_END_INPUT: u32 = 1;
162 pub const ISAL_OUT_OVERFLOW: u32 = 2;
163 pub const ISAL_NAME_OVERFLOW: u32 = 3;
164 pub const ISAL_COMMENT_OVERFLOW: u32 = 4;
165 pub const ISAL_EXTRA_OVERFLOW: u32 = 5;
166 pub const ISAL_NEED_DICT: u32 = 6;
167 pub const ISAL_INVALID_BLOCK: i32 = -1;
168 pub const ISAL_INVALID_SYMBOL: i32 = -2;
169 pub const ISAL_INVALID_LOOKBACK: i32 = -3;
170 pub const ISAL_INVALID_WRAPPER: i32 = -4;
171 pub const ISAL_UNSUPPORTED_METHOD: i32 = -5;
172 pub const ISAL_INCORRECT_CHECKSUM: i32 = -6;
173 pub const ISAL_DEF_MIN_LEVEL: u32 = 0;
174 pub const ISAL_DEF_MAX_LEVEL: u32 = 3;
175 pub const ISAL_DEF_LVL0_REQ: u32 = 0;
176 pub const ISAL_DEF_LVL1_REQ: u32 = 20480;
177 pub const ISAL_DEF_LVL1_TOKEN_SIZE: u32 = 4;
178 pub const ISAL_DEF_LVL2_REQ: u32 = 69632;
179 pub const ISAL_DEF_LVL2_TOKEN_SIZE: u32 = 4;
180 pub const ISAL_DEF_LVL3_REQ: u32 = 86016;
181 pub const ISAL_DEF_LVL3_TOKEN_SIZE: u32 = 4;
182 pub const ISAL_DEF_LVL0_MIN: u32 = 0;
183 pub const ISAL_DEF_LVL0_SMALL: u32 = 0;
184 pub const ISAL_DEF_LVL0_MEDIUM: u32 = 0;
185 pub const ISAL_DEF_LVL0_LARGE: u32 = 0;
186 pub const ISAL_DEF_LVL0_EXTRA_LARGE: u32 = 0;
187 pub const ISAL_DEF_LVL0_DEFAULT: u32 = 0;
188 pub const ISAL_DEF_LVL1_MIN: u32 = 24576;
189 pub const ISAL_DEF_LVL1_SMALL: u32 = 86016;
190 pub const ISAL_DEF_LVL1_MEDIUM: u32 = 151552;
191 pub const ISAL_DEF_LVL1_LARGE: u32 = 282624;
192 pub const ISAL_DEF_LVL1_EXTRA_LARGE: u32 = 544768;
193 pub const ISAL_DEF_LVL1_DEFAULT: u32 = 282624;
194 pub const ISAL_DEF_LVL2_MIN: u32 = 73728;
195 pub const ISAL_DEF_LVL2_SMALL: u32 = 135168;
196 pub const ISAL_DEF_LVL2_MEDIUM: u32 = 200704;
197 pub const ISAL_DEF_LVL2_LARGE: u32 = 331776;
198 pub const ISAL_DEF_LVL2_EXTRA_LARGE: u32 = 593920;
199 pub const ISAL_DEF_LVL2_DEFAULT: u32 = 331776;
200 pub const ISAL_DEF_LVL3_MIN: u32 = 90112;
201 pub const ISAL_DEF_LVL3_SMALL: u32 = 151552;
202 pub const ISAL_DEF_LVL3_MEDIUM: u32 = 217088;
203 pub const ISAL_DEF_LVL3_LARGE: u32 = 348160;
204 pub const ISAL_DEF_LVL3_EXTRA_LARGE: u32 = 610304;
205 pub const ISAL_DEF_LVL3_DEFAULT: u32 = 348160;
206 pub const IGZIP_NO_HIST: u32 = 0;
207 pub const IGZIP_HIST: u32 = 1;
208 pub const IGZIP_DICT_HIST: u32 = 2;
209 pub const IGZIP_DICT_HASH_SET: u32 = 3;
210 pub const ISAL_L_REM: u32 = 9;
211 pub const ISAL_S_REM: u32 = 5;
212 pub const ISAL_L_DUP: u32 = 502;
213 pub const ISAL_S_DUP: u32 = 26;
214 pub const ISAL_L_UNUSED: u32 = 465;
215 pub const ISAL_S_UNUSED: u32 = 21;
216 pub const ISAL_L_SIZE: u32 = 1253;
217 pub const ISAL_S_SIZE: u32 = 77;
218 pub const ISAL_HUFF_CODE_LARGE_LONG_ALIGNED: u32 = 1264;
219 pub const ISAL_HUFF_CODE_SMALL_LONG_ALIGNED: u32 = 80;
220 pub type __u_char = ::std::os::raw::c_uchar;
221 pub type __u_short = ::std::os::raw::c_ushort;
222 pub type __u_int = ::std::os::raw::c_uint;
223 pub type __u_long = ::std::os::raw::c_ulong;
224 pub type __int8_t = ::std::os::raw::c_schar;
225 pub type __uint8_t = ::std::os::raw::c_uchar;
226 pub type __int16_t = ::std::os::raw::c_short;
227 pub type __uint16_t = ::std::os::raw::c_ushort;
228 pub type __int32_t = ::std::os::raw::c_int;
229 pub type __uint32_t = ::std::os::raw::c_uint;
230 pub type __int64_t = ::std::os::raw::c_long;
231 pub type __uint64_t = ::std::os::raw::c_ulong;
232 pub type __int_least8_t = __int8_t;
233 pub type __uint_least8_t = __uint8_t;
234 pub type __int_least16_t = __int16_t;
235 pub type __uint_least16_t = __uint16_t;
236 pub type __int_least32_t = __int32_t;
237 pub type __uint_least32_t = __uint32_t;
238 pub type __int_least64_t = __int64_t;
239 pub type __uint_least64_t = __uint64_t;
240 pub type __quad_t = ::std::os::raw::c_long;
241 pub type __u_quad_t = ::std::os::raw::c_ulong;
242 pub type __intmax_t = ::std::os::raw::c_long;
243 pub type __uintmax_t = ::std::os::raw::c_ulong;
244 pub type __dev_t = ::std::os::raw::c_ulong;
245 pub type __uid_t = ::std::os::raw::c_uint;
246 pub type __gid_t = ::std::os::raw::c_uint;
247 pub type __ino_t = ::std::os::raw::c_ulong;
248 pub type __ino64_t = ::std::os::raw::c_ulong;
249 pub type __mode_t = ::std::os::raw::c_uint;
250 pub type __nlink_t = ::std::os::raw::c_ulong;
251 pub type __off64_t = ::std::os::raw::c_long;
252 pub type __pid_t = ::std::os::raw::c_int;
253 #[repr(C)]
254 #[derive(Debug, Copy, Clone)]
255 pub struct __fsid_t {
256 pub __val: [::std::os::raw::c_int; 2usize],
257 }
258 #[test]
259 fn bindgen_test_layout___fsid_t() {
260 const UNINIT: ::std::mem::MaybeUninit<__fsid_t> = ::std::mem::MaybeUninit::uninit();
261 let ptr = UNINIT.as_ptr();
262 assert_eq!(
263 ::std::mem::size_of::<__fsid_t>(),
264 8usize,
265 concat!("Size of: ", stringify!(__fsid_t))
266 );
267 assert_eq!(
268 ::std::mem::align_of::<__fsid_t>(),
269 4usize,
270 concat!("Alignment of ", stringify!(__fsid_t))
271 );
272 assert_eq!(
273 unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
274 0usize,
275 concat!(
276 "Offset of field: ",
277 stringify!(__fsid_t),
278 "::",
279 stringify!(__val)
280 )
281 );
282 }
283 pub type __clock_t = ::std::os::raw::c_long;
284 pub type __rlim_t = ::std::os::raw::c_ulong;
285 pub type __rlim64_t = ::std::os::raw::c_ulong;
286 pub type __id_t = ::std::os::raw::c_uint;
287 pub type __useconds_t = ::std::os::raw::c_uint;
288 pub type __suseconds_t = ::std::os::raw::c_long;
289 pub type __suseconds64_t = ::std::os::raw::c_long;
290 pub type __daddr_t = ::std::os::raw::c_int;
291 pub type __key_t = ::std::os::raw::c_int;
292 pub type __clockid_t = ::std::os::raw::c_int;
293 pub type __timer_t = *mut ::std::os::raw::c_void;
294 pub type __blksize_t = ::std::os::raw::c_long;
295 pub type __blkcnt_t = ::std::os::raw::c_long;
296 pub type __blkcnt64_t = ::std::os::raw::c_long;
297 pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
298 pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
299 pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
300 pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
301 pub type __fsword_t = ::std::os::raw::c_long;
302 pub type __ssize_t = ::std::os::raw::c_long;
303 pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
304 pub type __loff_t = __off64_t;
305 pub type __caddr_t = *mut ::std::os::raw::c_char;
306 pub type __intptr_t = ::std::os::raw::c_long;
307 pub type __socklen_t = ::std::os::raw::c_uint;
308 pub type __sig_atomic_t = ::std::os::raw::c_int;
309 pub type int_least8_t = __int_least8_t;
310 pub type int_least16_t = __int_least16_t;
311 pub type int_least32_t = __int_least32_t;
312 pub type int_least64_t = __int_least64_t;
313 pub type uint_least8_t = __uint_least8_t;
314 pub type uint_least16_t = __uint_least16_t;
315 pub type uint_least32_t = __uint_least32_t;
316 pub type uint_least64_t = __uint_least64_t;
317 pub type int_fast8_t = ::std::os::raw::c_schar;
318 pub type int_fast16_t = ::std::os::raw::c_long;
319 pub type int_fast32_t = ::std::os::raw::c_long;
320 pub type int_fast64_t = ::std::os::raw::c_long;
321 pub type uint_fast8_t = ::std::os::raw::c_uchar;
322 pub type uint_fast16_t = ::std::os::raw::c_ulong;
323 pub type uint_fast32_t = ::std::os::raw::c_ulong;
324 pub type uint_fast64_t = ::std::os::raw::c_ulong;
325 pub type intmax_t = __intmax_t;
326 pub type uintmax_t = __uintmax_t;
327 pub const IGZIP_DIST_TABLE_SIZE: _bindgen_ty_1 = 2;
328 pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
329 pub const IGZIP_DECODE_OFFSET: _bindgen_ty_2 = 0;
330 pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
331 pub const IGZIP_LEN_TABLE_SIZE: _bindgen_ty_3 = 256;
332 pub type _bindgen_ty_3 = ::std::os::raw::c_uint;
333 pub const IGZIP_LIT_TABLE_SIZE: _bindgen_ty_4 = 257;
334 pub type _bindgen_ty_4 = ::std::os::raw::c_uint;
335 #[doc = "!< Header to be written"]
336 pub const isal_zstate_state_ZSTATE_NEW_HDR: isal_zstate_state = 0;
337 #[doc = "!< Header state"]
338 pub const isal_zstate_state_ZSTATE_HDR: isal_zstate_state = 1;
339 #[doc = "!< Header to be created"]
340 pub const isal_zstate_state_ZSTATE_CREATE_HDR: isal_zstate_state = 2;
341 #[doc = "!< Body state"]
342 pub const isal_zstate_state_ZSTATE_BODY: isal_zstate_state = 3;
343 #[doc = "!< Flush buffer"]
344 pub const isal_zstate_state_ZSTATE_FLUSH_READ_BUFFER: isal_zstate_state = 4;
345 pub const isal_zstate_state_ZSTATE_FLUSH_ICF_BUFFER: isal_zstate_state = 5;
346 pub const isal_zstate_state_ZSTATE_TYPE0_HDR: isal_zstate_state = 6;
347 #[doc = "!< Type0 block body to be written"]
348 pub const isal_zstate_state_ZSTATE_TYPE0_BODY: isal_zstate_state = 7;
349 #[doc = "!< Write sync flush block"]
350 pub const isal_zstate_state_ZSTATE_SYNC_FLUSH: isal_zstate_state = 8;
351 #[doc = "!< Flush bitbuf"]
352 pub const isal_zstate_state_ZSTATE_FLUSH_WRITE_BUFFER: isal_zstate_state = 9;
353 #[doc = "!< Trailer state"]
354 pub const isal_zstate_state_ZSTATE_TRL: isal_zstate_state = 10;
355 #[doc = "!< End state"]
356 pub const isal_zstate_state_ZSTATE_END: isal_zstate_state = 11;
357 #[doc = "!< Temporary Header to be written"]
358 pub const isal_zstate_state_ZSTATE_TMP_NEW_HDR: isal_zstate_state = 12;
359 #[doc = "!< Temporary Header state"]
360 pub const isal_zstate_state_ZSTATE_TMP_HDR: isal_zstate_state = 13;
361 #[doc = "!< Temporary Header to be created state"]
362 pub const isal_zstate_state_ZSTATE_TMP_CREATE_HDR: isal_zstate_state = 14;
363 #[doc = "!< Temporary Body state"]
364 pub const isal_zstate_state_ZSTATE_TMP_BODY: isal_zstate_state = 15;
365 #[doc = "!< Flush buffer"]
366 pub const isal_zstate_state_ZSTATE_TMP_FLUSH_READ_BUFFER: isal_zstate_state = 16;
367 pub const isal_zstate_state_ZSTATE_TMP_FLUSH_ICF_BUFFER: isal_zstate_state = 17;
368 pub const isal_zstate_state_ZSTATE_TMP_TYPE0_HDR: isal_zstate_state = 18;
369 #[doc = "!< Temporary Type0 block body to be written"]
370 pub const isal_zstate_state_ZSTATE_TMP_TYPE0_BODY: isal_zstate_state = 19;
371 #[doc = "!< Write sync flush block"]
372 pub const isal_zstate_state_ZSTATE_TMP_SYNC_FLUSH: isal_zstate_state = 20;
373 #[doc = "!< Flush bitbuf"]
374 pub const isal_zstate_state_ZSTATE_TMP_FLUSH_WRITE_BUFFER: isal_zstate_state = 21;
375 #[doc = "!< Temporary Trailer state"]
376 pub const isal_zstate_state_ZSTATE_TMP_TRL: isal_zstate_state = 22;
377 #[doc = "!< Temporary End state"]
378 pub const isal_zstate_state_ZSTATE_TMP_END: isal_zstate_state = 23;
379 #[doc = " @enum isal_zstate_state\n @brief Compression State please note ZSTATE_TRL only applies for GZIP compression"]
380 pub type isal_zstate_state = ::std::os::raw::c_uint;
381 pub const isal_block_state_ISAL_BLOCK_NEW_HDR: isal_block_state = 0;
382 pub const isal_block_state_ISAL_BLOCK_HDR: isal_block_state = 1;
383 pub const isal_block_state_ISAL_BLOCK_TYPE0: isal_block_state = 2;
384 pub const isal_block_state_ISAL_BLOCK_CODED: isal_block_state = 3;
385 pub const isal_block_state_ISAL_BLOCK_INPUT_DONE: isal_block_state = 4;
386 pub const isal_block_state_ISAL_BLOCK_FINISH: isal_block_state = 5;
387 pub const isal_block_state_ISAL_GZIP_EXTRA_LEN: isal_block_state = 6;
388 pub const isal_block_state_ISAL_GZIP_EXTRA: isal_block_state = 7;
389 pub const isal_block_state_ISAL_GZIP_NAME: isal_block_state = 8;
390 pub const isal_block_state_ISAL_GZIP_COMMENT: isal_block_state = 9;
391 pub const isal_block_state_ISAL_GZIP_HCRC: isal_block_state = 10;
392 pub const isal_block_state_ISAL_ZLIB_DICT: isal_block_state = 11;
393 pub const isal_block_state_ISAL_CHECKSUM_CHECK: isal_block_state = 12;
394 pub type isal_block_state = ::std::os::raw::c_uint;
395 #[doc = "/\n/** @brief Holds histogram of deflate symbols"]
396 #[repr(C)]
397 #[derive(Debug, Copy, Clone)]
398 pub struct isal_huff_histogram {
399 #[doc = "!< Histogram of Literal/Len symbols\n!< seen"]
400 pub lit_len_histogram: [u64; 286usize],
401 #[doc = "!< Histogram of Distance Symbols seen"]
402 pub dist_histogram: [u64; 30usize],
403 #[doc = "!< Tmp space used as a hash table"]
404 pub hash_table: [u16; 8192usize],
405 }
406 #[test]
407 fn bindgen_test_layout_isal_huff_histogram() {
408 const UNINIT: ::std::mem::MaybeUninit<isal_huff_histogram> =
409 ::std::mem::MaybeUninit::uninit();
410 let ptr = UNINIT.as_ptr();
411 assert_eq!(
412 ::std::mem::size_of::<isal_huff_histogram>(),
413 18912usize,
414 concat!("Size of: ", stringify!(isal_huff_histogram))
415 );
416 assert_eq!(
417 ::std::mem::align_of::<isal_huff_histogram>(),
418 8usize,
419 concat!("Alignment of ", stringify!(isal_huff_histogram))
420 );
421 assert_eq!(
422 unsafe { ::std::ptr::addr_of!((*ptr).lit_len_histogram) as usize - ptr as usize },
423 0usize,
424 concat!(
425 "Offset of field: ",
426 stringify!(isal_huff_histogram),
427 "::",
428 stringify!(lit_len_histogram)
429 )
430 );
431 assert_eq!(
432 unsafe { ::std::ptr::addr_of!((*ptr).dist_histogram) as usize - ptr as usize },
433 2288usize,
434 concat!(
435 "Offset of field: ",
436 stringify!(isal_huff_histogram),
437 "::",
438 stringify!(dist_histogram)
439 )
440 );
441 assert_eq!(
442 unsafe { ::std::ptr::addr_of!((*ptr).hash_table) as usize - ptr as usize },
443 2528usize,
444 concat!(
445 "Offset of field: ",
446 stringify!(isal_huff_histogram),
447 "::",
448 stringify!(hash_table)
449 )
450 );
451 }
452 #[doc = " @brief Holds modified histogram"]
453 #[repr(C)]
454 #[derive(Debug, Copy, Clone)]
455 pub struct isal_mod_hist {
456 #[doc = "!< Distance"]
457 pub d_hist: [u32; 30usize],
458 pub ll_hist: [u32; 513usize],
459 }
460 #[test]
461 fn bindgen_test_layout_isal_mod_hist() {
462 const UNINIT: ::std::mem::MaybeUninit<isal_mod_hist> = ::std::mem::MaybeUninit::uninit();
463 let ptr = UNINIT.as_ptr();
464 assert_eq!(
465 ::std::mem::size_of::<isal_mod_hist>(),
466 2172usize,
467 concat!("Size of: ", stringify!(isal_mod_hist))
468 );
469 assert_eq!(
470 ::std::mem::align_of::<isal_mod_hist>(),
471 4usize,
472 concat!("Alignment of ", stringify!(isal_mod_hist))
473 );
474 assert_eq!(
475 unsafe { ::std::ptr::addr_of!((*ptr).d_hist) as usize - ptr as usize },
476 0usize,
477 concat!(
478 "Offset of field: ",
479 stringify!(isal_mod_hist),
480 "::",
481 stringify!(d_hist)
482 )
483 );
484 assert_eq!(
485 unsafe { ::std::ptr::addr_of!((*ptr).ll_hist) as usize - ptr as usize },
486 120usize,
487 concat!(
488 "Offset of field: ",
489 stringify!(isal_mod_hist),
490 "::",
491 stringify!(ll_hist)
492 )
493 );
494 }
495 #[doc = " @brief Holds Bit Buffer information"]
496 #[repr(C)]
497 #[derive(Debug, Copy, Clone)]
498 pub struct BitBuf2 {
499 #[doc = "!< bits in the bit buffer"]
500 pub m_bits: u64,
501 #[doc = "!< number of valid bits in the bit buffer"]
502 pub m_bit_count: u32,
503 #[doc = "!< current index of buffer to write to"]
504 pub m_out_buf: *mut u8,
505 #[doc = "!< end of buffer to write to"]
506 pub m_out_end: *mut u8,
507 #[doc = "!< start of buffer to write to"]
508 pub m_out_start: *mut u8,
509 }
510 #[test]
511 fn bindgen_test_layout_BitBuf2() {
512 const UNINIT: ::std::mem::MaybeUninit<BitBuf2> = ::std::mem::MaybeUninit::uninit();
513 let ptr = UNINIT.as_ptr();
514 assert_eq!(
515 ::std::mem::size_of::<BitBuf2>(),
516 40usize,
517 concat!("Size of: ", stringify!(BitBuf2))
518 );
519 assert_eq!(
520 ::std::mem::align_of::<BitBuf2>(),
521 8usize,
522 concat!("Alignment of ", stringify!(BitBuf2))
523 );
524 assert_eq!(
525 unsafe { ::std::ptr::addr_of!((*ptr).m_bits) as usize - ptr as usize },
526 0usize,
527 concat!(
528 "Offset of field: ",
529 stringify!(BitBuf2),
530 "::",
531 stringify!(m_bits)
532 )
533 );
534 assert_eq!(
535 unsafe { ::std::ptr::addr_of!((*ptr).m_bit_count) as usize - ptr as usize },
536 8usize,
537 concat!(
538 "Offset of field: ",
539 stringify!(BitBuf2),
540 "::",
541 stringify!(m_bit_count)
542 )
543 );
544 assert_eq!(
545 unsafe { ::std::ptr::addr_of!((*ptr).m_out_buf) as usize - ptr as usize },
546 16usize,
547 concat!(
548 "Offset of field: ",
549 stringify!(BitBuf2),
550 "::",
551 stringify!(m_out_buf)
552 )
553 );
554 assert_eq!(
555 unsafe { ::std::ptr::addr_of!((*ptr).m_out_end) as usize - ptr as usize },
556 24usize,
557 concat!(
558 "Offset of field: ",
559 stringify!(BitBuf2),
560 "::",
561 stringify!(m_out_end)
562 )
563 );
564 assert_eq!(
565 unsafe { ::std::ptr::addr_of!((*ptr).m_out_start) as usize - ptr as usize },
566 32usize,
567 concat!(
568 "Offset of field: ",
569 stringify!(BitBuf2),
570 "::",
571 stringify!(m_out_start)
572 )
573 );
574 }
575 #[doc = " @brief Holds Zlib header information"]
576 #[repr(C)]
577 #[derive(Debug, Copy, Clone)]
578 pub struct isal_zlib_header {
579 #[doc = "!< base-2 logarithm of the LZ77 window size minus 8"]
580 pub info: u32,
581 #[doc = "!< Compression level (fastest, fast, default, maximum)"]
582 pub level: u32,
583 #[doc = "!< Dictionary id"]
584 pub dict_id: u32,
585 #[doc = "!< Whether to use a dictionary"]
586 pub dict_flag: u32,
587 }
588 #[test]
589 fn bindgen_test_layout_isal_zlib_header() {
590 const UNINIT: ::std::mem::MaybeUninit<isal_zlib_header> = ::std::mem::MaybeUninit::uninit();
591 let ptr = UNINIT.as_ptr();
592 assert_eq!(
593 ::std::mem::size_of::<isal_zlib_header>(),
594 16usize,
595 concat!("Size of: ", stringify!(isal_zlib_header))
596 );
597 assert_eq!(
598 ::std::mem::align_of::<isal_zlib_header>(),
599 4usize,
600 concat!("Alignment of ", stringify!(isal_zlib_header))
601 );
602 assert_eq!(
603 unsafe { ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize },
604 0usize,
605 concat!(
606 "Offset of field: ",
607 stringify!(isal_zlib_header),
608 "::",
609 stringify!(info)
610 )
611 );
612 assert_eq!(
613 unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize },
614 4usize,
615 concat!(
616 "Offset of field: ",
617 stringify!(isal_zlib_header),
618 "::",
619 stringify!(level)
620 )
621 );
622 assert_eq!(
623 unsafe { ::std::ptr::addr_of!((*ptr).dict_id) as usize - ptr as usize },
624 8usize,
625 concat!(
626 "Offset of field: ",
627 stringify!(isal_zlib_header),
628 "::",
629 stringify!(dict_id)
630 )
631 );
632 assert_eq!(
633 unsafe { ::std::ptr::addr_of!((*ptr).dict_flag) as usize - ptr as usize },
634 12usize,
635 concat!(
636 "Offset of field: ",
637 stringify!(isal_zlib_header),
638 "::",
639 stringify!(dict_flag)
640 )
641 );
642 }
643 #[doc = " @brief Holds Gzip header information"]
644 #[repr(C)]
645 #[derive(Debug, Copy, Clone)]
646 pub struct isal_gzip_header {
647 #[doc = "!< Optional Text hint"]
648 pub text: u32,
649 #[doc = "!< Unix modification time in gzip header"]
650 pub time: u32,
651 #[doc = "!< xflags in gzip header"]
652 pub xflags: u32,
653 #[doc = "!< OS in gzip header"]
654 pub os: u32,
655 #[doc = "!< Extra field in gzip header"]
656 pub extra: *mut u8,
657 #[doc = "!< Length of extra buffer"]
658 pub extra_buf_len: u32,
659 #[doc = "!< Actual length of gzip header extra field"]
660 pub extra_len: u32,
661 #[doc = "!< Name in gzip header"]
662 pub name: *mut ::std::os::raw::c_char,
663 #[doc = "!< Length of name buffer"]
664 pub name_buf_len: u32,
665 #[doc = "!< Comments in gzip header"]
666 pub comment: *mut ::std::os::raw::c_char,
667 #[doc = "!< Length of comment buffer"]
668 pub comment_buf_len: u32,
669 #[doc = "!< Header crc or header crc flag"]
670 pub hcrc: u32,
671 #[doc = "!< Internal data"]
672 pub flags: u32,
673 }
674 #[test]
675 fn bindgen_test_layout_isal_gzip_header() {
676 const UNINIT: ::std::mem::MaybeUninit<isal_gzip_header> = ::std::mem::MaybeUninit::uninit();
677 let ptr = UNINIT.as_ptr();
678 assert_eq!(
679 ::std::mem::size_of::<isal_gzip_header>(),
680 72usize,
681 concat!("Size of: ", stringify!(isal_gzip_header))
682 );
683 assert_eq!(
684 ::std::mem::align_of::<isal_gzip_header>(),
685 8usize,
686 concat!("Alignment of ", stringify!(isal_gzip_header))
687 );
688 assert_eq!(
689 unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize },
690 0usize,
691 concat!(
692 "Offset of field: ",
693 stringify!(isal_gzip_header),
694 "::",
695 stringify!(text)
696 )
697 );
698 assert_eq!(
699 unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize },
700 4usize,
701 concat!(
702 "Offset of field: ",
703 stringify!(isal_gzip_header),
704 "::",
705 stringify!(time)
706 )
707 );
708 assert_eq!(
709 unsafe { ::std::ptr::addr_of!((*ptr).xflags) as usize - ptr as usize },
710 8usize,
711 concat!(
712 "Offset of field: ",
713 stringify!(isal_gzip_header),
714 "::",
715 stringify!(xflags)
716 )
717 );
718 assert_eq!(
719 unsafe { ::std::ptr::addr_of!((*ptr).os) as usize - ptr as usize },
720 12usize,
721 concat!(
722 "Offset of field: ",
723 stringify!(isal_gzip_header),
724 "::",
725 stringify!(os)
726 )
727 );
728 assert_eq!(
729 unsafe { ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize },
730 16usize,
731 concat!(
732 "Offset of field: ",
733 stringify!(isal_gzip_header),
734 "::",
735 stringify!(extra)
736 )
737 );
738 assert_eq!(
739 unsafe { ::std::ptr::addr_of!((*ptr).extra_buf_len) as usize - ptr as usize },
740 24usize,
741 concat!(
742 "Offset of field: ",
743 stringify!(isal_gzip_header),
744 "::",
745 stringify!(extra_buf_len)
746 )
747 );
748 assert_eq!(
749 unsafe { ::std::ptr::addr_of!((*ptr).extra_len) as usize - ptr as usize },
750 28usize,
751 concat!(
752 "Offset of field: ",
753 stringify!(isal_gzip_header),
754 "::",
755 stringify!(extra_len)
756 )
757 );
758 assert_eq!(
759 unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
760 32usize,
761 concat!(
762 "Offset of field: ",
763 stringify!(isal_gzip_header),
764 "::",
765 stringify!(name)
766 )
767 );
768 assert_eq!(
769 unsafe { ::std::ptr::addr_of!((*ptr).name_buf_len) as usize - ptr as usize },
770 40usize,
771 concat!(
772 "Offset of field: ",
773 stringify!(isal_gzip_header),
774 "::",
775 stringify!(name_buf_len)
776 )
777 );
778 assert_eq!(
779 unsafe { ::std::ptr::addr_of!((*ptr).comment) as usize - ptr as usize },
780 48usize,
781 concat!(
782 "Offset of field: ",
783 stringify!(isal_gzip_header),
784 "::",
785 stringify!(comment)
786 )
787 );
788 assert_eq!(
789 unsafe { ::std::ptr::addr_of!((*ptr).comment_buf_len) as usize - ptr as usize },
790 56usize,
791 concat!(
792 "Offset of field: ",
793 stringify!(isal_gzip_header),
794 "::",
795 stringify!(comment_buf_len)
796 )
797 );
798 assert_eq!(
799 unsafe { ::std::ptr::addr_of!((*ptr).hcrc) as usize - ptr as usize },
800 60usize,
801 concat!(
802 "Offset of field: ",
803 stringify!(isal_gzip_header),
804 "::",
805 stringify!(hcrc)
806 )
807 );
808 assert_eq!(
809 unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
810 64usize,
811 concat!(
812 "Offset of field: ",
813 stringify!(isal_gzip_header),
814 "::",
815 stringify!(flags)
816 )
817 );
818 }
819 #[doc = " @brief Holds the internal state information for input and output compression streams"]
820 #[repr(C)]
821 #[derive(Debug, Copy, Clone)]
822 pub struct isal_zstate {
823 #[doc = "!< Not used, may be replaced with something else"]
824 pub total_in_start: u32,
825 #[doc = "!< Start of current deflate block in the input"]
826 pub block_next: u32,
827 #[doc = "!< End of current deflate block in the input"]
828 pub block_end: u32,
829 #[doc = "!< Distance mask used."]
830 pub dist_mask: u32,
831 pub hash_mask: u32,
832 #[doc = "!< Current state in processing the data stream"]
833 pub state: isal_zstate_state,
834 #[doc = "!< Bit Buffer"]
835 pub bitbuf: BitBuf2,
836 #[doc = "!< Current checksum without finalize step if any (adler)"]
837 pub crc: u32,
838 #[doc = "!< keeps track of wrapper header"]
839 pub has_wrap_hdr: u8,
840 #[doc = "!< keeps track of eob hdr (with BFINAL set)"]
841 pub has_eob_hdr: u8,
842 #[doc = "!< keeps track of eob on the last deflate block"]
843 pub has_eob: u8,
844 #[doc = "!< flag to track if there is match history"]
845 pub has_hist: u8,
846 #[doc = "!< flag to track if user supplied memory has been initialized."]
847 pub has_level_buf_init: u16,
848 #[doc = "!< used for partial header/trailer writes"]
849 pub count: u32,
850 #[doc = "!< temporary array"]
851 pub tmp_out_buff: [u8; 16usize],
852 #[doc = "!< temporary variable"]
853 pub tmp_out_start: u32,
854 #[doc = "!< temporary variable"]
855 pub tmp_out_end: u32,
856 #[doc = "!< number of valid bytes in buffer"]
857 pub b_bytes_valid: u32,
858 #[doc = "!< number of bytes processed in buffer"]
859 pub b_bytes_processed: u32,
860 #[doc = "!< Internal buffer"]
861 pub buffer: [u8; 65824usize],
862 #[doc = "!< Hash array"]
863 pub head: [u16; 8192usize],
864 }
865 #[test]
866 fn bindgen_test_layout_isal_zstate() {
867 const UNINIT: ::std::mem::MaybeUninit<isal_zstate> = ::std::mem::MaybeUninit::uninit();
868 let ptr = UNINIT.as_ptr();
869 assert_eq!(
870 ::std::mem::size_of::<isal_zstate>(),
871 82320usize,
872 concat!("Size of: ", stringify!(isal_zstate))
873 );
874 assert_eq!(
875 ::std::mem::align_of::<isal_zstate>(),
876 8usize,
877 concat!("Alignment of ", stringify!(isal_zstate))
878 );
879 assert_eq!(
880 unsafe { ::std::ptr::addr_of!((*ptr).total_in_start) as usize - ptr as usize },
881 0usize,
882 concat!(
883 "Offset of field: ",
884 stringify!(isal_zstate),
885 "::",
886 stringify!(total_in_start)
887 )
888 );
889 assert_eq!(
890 unsafe { ::std::ptr::addr_of!((*ptr).block_next) as usize - ptr as usize },
891 4usize,
892 concat!(
893 "Offset of field: ",
894 stringify!(isal_zstate),
895 "::",
896 stringify!(block_next)
897 )
898 );
899 assert_eq!(
900 unsafe { ::std::ptr::addr_of!((*ptr).block_end) as usize - ptr as usize },
901 8usize,
902 concat!(
903 "Offset of field: ",
904 stringify!(isal_zstate),
905 "::",
906 stringify!(block_end)
907 )
908 );
909 assert_eq!(
910 unsafe { ::std::ptr::addr_of!((*ptr).dist_mask) as usize - ptr as usize },
911 12usize,
912 concat!(
913 "Offset of field: ",
914 stringify!(isal_zstate),
915 "::",
916 stringify!(dist_mask)
917 )
918 );
919 assert_eq!(
920 unsafe { ::std::ptr::addr_of!((*ptr).hash_mask) as usize - ptr as usize },
921 16usize,
922 concat!(
923 "Offset of field: ",
924 stringify!(isal_zstate),
925 "::",
926 stringify!(hash_mask)
927 )
928 );
929 assert_eq!(
930 unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
931 20usize,
932 concat!(
933 "Offset of field: ",
934 stringify!(isal_zstate),
935 "::",
936 stringify!(state)
937 )
938 );
939 assert_eq!(
940 unsafe { ::std::ptr::addr_of!((*ptr).bitbuf) as usize - ptr as usize },
941 24usize,
942 concat!(
943 "Offset of field: ",
944 stringify!(isal_zstate),
945 "::",
946 stringify!(bitbuf)
947 )
948 );
949 assert_eq!(
950 unsafe { ::std::ptr::addr_of!((*ptr).crc) as usize - ptr as usize },
951 64usize,
952 concat!(
953 "Offset of field: ",
954 stringify!(isal_zstate),
955 "::",
956 stringify!(crc)
957 )
958 );
959 assert_eq!(
960 unsafe { ::std::ptr::addr_of!((*ptr).has_wrap_hdr) as usize - ptr as usize },
961 68usize,
962 concat!(
963 "Offset of field: ",
964 stringify!(isal_zstate),
965 "::",
966 stringify!(has_wrap_hdr)
967 )
968 );
969 assert_eq!(
970 unsafe { ::std::ptr::addr_of!((*ptr).has_eob_hdr) as usize - ptr as usize },
971 69usize,
972 concat!(
973 "Offset of field: ",
974 stringify!(isal_zstate),
975 "::",
976 stringify!(has_eob_hdr)
977 )
978 );
979 assert_eq!(
980 unsafe { ::std::ptr::addr_of!((*ptr).has_eob) as usize - ptr as usize },
981 70usize,
982 concat!(
983 "Offset of field: ",
984 stringify!(isal_zstate),
985 "::",
986 stringify!(has_eob)
987 )
988 );
989 assert_eq!(
990 unsafe { ::std::ptr::addr_of!((*ptr).has_hist) as usize - ptr as usize },
991 71usize,
992 concat!(
993 "Offset of field: ",
994 stringify!(isal_zstate),
995 "::",
996 stringify!(has_hist)
997 )
998 );
999 assert_eq!(
1000 unsafe { ::std::ptr::addr_of!((*ptr).has_level_buf_init) as usize - ptr as usize },
1001 72usize,
1002 concat!(
1003 "Offset of field: ",
1004 stringify!(isal_zstate),
1005 "::",
1006 stringify!(has_level_buf_init)
1007 )
1008 );
1009 assert_eq!(
1010 unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
1011 76usize,
1012 concat!(
1013 "Offset of field: ",
1014 stringify!(isal_zstate),
1015 "::",
1016 stringify!(count)
1017 )
1018 );
1019 assert_eq!(
1020 unsafe { ::std::ptr::addr_of!((*ptr).tmp_out_buff) as usize - ptr as usize },
1021 80usize,
1022 concat!(
1023 "Offset of field: ",
1024 stringify!(isal_zstate),
1025 "::",
1026 stringify!(tmp_out_buff)
1027 )
1028 );
1029 assert_eq!(
1030 unsafe { ::std::ptr::addr_of!((*ptr).tmp_out_start) as usize - ptr as usize },
1031 96usize,
1032 concat!(
1033 "Offset of field: ",
1034 stringify!(isal_zstate),
1035 "::",
1036 stringify!(tmp_out_start)
1037 )
1038 );
1039 assert_eq!(
1040 unsafe { ::std::ptr::addr_of!((*ptr).tmp_out_end) as usize - ptr as usize },
1041 100usize,
1042 concat!(
1043 "Offset of field: ",
1044 stringify!(isal_zstate),
1045 "::",
1046 stringify!(tmp_out_end)
1047 )
1048 );
1049 assert_eq!(
1050 unsafe { ::std::ptr::addr_of!((*ptr).b_bytes_valid) as usize - ptr as usize },
1051 104usize,
1052 concat!(
1053 "Offset of field: ",
1054 stringify!(isal_zstate),
1055 "::",
1056 stringify!(b_bytes_valid)
1057 )
1058 );
1059 assert_eq!(
1060 unsafe { ::std::ptr::addr_of!((*ptr).b_bytes_processed) as usize - ptr as usize },
1061 108usize,
1062 concat!(
1063 "Offset of field: ",
1064 stringify!(isal_zstate),
1065 "::",
1066 stringify!(b_bytes_processed)
1067 )
1068 );
1069 assert_eq!(
1070 unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
1071 112usize,
1072 concat!(
1073 "Offset of field: ",
1074 stringify!(isal_zstate),
1075 "::",
1076 stringify!(buffer)
1077 )
1078 );
1079 assert_eq!(
1080 unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize },
1081 65936usize,
1082 concat!(
1083 "Offset of field: ",
1084 stringify!(isal_zstate),
1085 "::",
1086 stringify!(head)
1087 )
1088 );
1089 }
1090 #[doc = " @brief Holds the huffman tree used to huffman encode the input stream"]
1091 #[repr(C)]
1092 #[derive(Debug, Copy, Clone)]
1093 pub struct isal_hufftables {
1094 #[doc = "!< deflate huffman tree header"]
1095 pub deflate_hdr: [u8; 328usize],
1096 #[doc = "!< Number of whole bytes in deflate_huff_hdr"]
1097 pub deflate_hdr_count: u32,
1098 #[doc = "!< Number of bits in the partial byte in header"]
1099 pub deflate_hdr_extra_bits: u32,
1100 #[doc = "!< bits 4:0 are the code length, bits 31:5 are\n!< the code"]
1101 pub dist_table: [u32; 2usize],
1102 #[doc = "!< bits 4:0 are the code length, bits 31:5 are\n!< the code"]
1103 pub len_table: [u32; 256usize],
1104 #[doc = "!< literal code"]
1105 pub lit_table: [u16; 257usize],
1106 #[doc = "!< literal code length"]
1107 pub lit_table_sizes: [u8; 257usize],
1108 #[doc = "!< distance code"]
1109 pub dcodes: [u16; 30usize],
1110 #[doc = "!< distance code length"]
1111 pub dcodes_sizes: [u8; 30usize],
1112 }
1113 #[test]
1114 fn bindgen_test_layout_isal_hufftables() {
1115 const UNINIT: ::std::mem::MaybeUninit<isal_hufftables> = ::std::mem::MaybeUninit::uninit();
1116 let ptr = UNINIT.as_ptr();
1117 assert_eq!(
1118 ::std::mem::size_of::<isal_hufftables>(),
1119 2232usize,
1120 concat!("Size of: ", stringify!(isal_hufftables))
1121 );
1122 assert_eq!(
1123 ::std::mem::align_of::<isal_hufftables>(),
1124 4usize,
1125 concat!("Alignment of ", stringify!(isal_hufftables))
1126 );
1127 assert_eq!(
1128 unsafe { ::std::ptr::addr_of!((*ptr).deflate_hdr) as usize - ptr as usize },
1129 0usize,
1130 concat!(
1131 "Offset of field: ",
1132 stringify!(isal_hufftables),
1133 "::",
1134 stringify!(deflate_hdr)
1135 )
1136 );
1137 assert_eq!(
1138 unsafe { ::std::ptr::addr_of!((*ptr).deflate_hdr_count) as usize - ptr as usize },
1139 328usize,
1140 concat!(
1141 "Offset of field: ",
1142 stringify!(isal_hufftables),
1143 "::",
1144 stringify!(deflate_hdr_count)
1145 )
1146 );
1147 assert_eq!(
1148 unsafe { ::std::ptr::addr_of!((*ptr).deflate_hdr_extra_bits) as usize - ptr as usize },
1149 332usize,
1150 concat!(
1151 "Offset of field: ",
1152 stringify!(isal_hufftables),
1153 "::",
1154 stringify!(deflate_hdr_extra_bits)
1155 )
1156 );
1157 assert_eq!(
1158 unsafe { ::std::ptr::addr_of!((*ptr).dist_table) as usize - ptr as usize },
1159 336usize,
1160 concat!(
1161 "Offset of field: ",
1162 stringify!(isal_hufftables),
1163 "::",
1164 stringify!(dist_table)
1165 )
1166 );
1167 assert_eq!(
1168 unsafe { ::std::ptr::addr_of!((*ptr).len_table) as usize - ptr as usize },
1169 344usize,
1170 concat!(
1171 "Offset of field: ",
1172 stringify!(isal_hufftables),
1173 "::",
1174 stringify!(len_table)
1175 )
1176 );
1177 assert_eq!(
1178 unsafe { ::std::ptr::addr_of!((*ptr).lit_table) as usize - ptr as usize },
1179 1368usize,
1180 concat!(
1181 "Offset of field: ",
1182 stringify!(isal_hufftables),
1183 "::",
1184 stringify!(lit_table)
1185 )
1186 );
1187 assert_eq!(
1188 unsafe { ::std::ptr::addr_of!((*ptr).lit_table_sizes) as usize - ptr as usize },
1189 1882usize,
1190 concat!(
1191 "Offset of field: ",
1192 stringify!(isal_hufftables),
1193 "::",
1194 stringify!(lit_table_sizes)
1195 )
1196 );
1197 assert_eq!(
1198 unsafe { ::std::ptr::addr_of!((*ptr).dcodes) as usize - ptr as usize },
1199 2140usize,
1200 concat!(
1201 "Offset of field: ",
1202 stringify!(isal_hufftables),
1203 "::",
1204 stringify!(dcodes)
1205 )
1206 );
1207 assert_eq!(
1208 unsafe { ::std::ptr::addr_of!((*ptr).dcodes_sizes) as usize - ptr as usize },
1209 2200usize,
1210 concat!(
1211 "Offset of field: ",
1212 stringify!(isal_hufftables),
1213 "::",
1214 stringify!(dcodes_sizes)
1215 )
1216 );
1217 }
1218 #[doc = " @brief Holds stream information"]
1219 #[repr(C)]
1220 #[derive(Debug, Copy, Clone)]
1221 pub struct isal_zstream {
1222 #[doc = "!< Next input byte"]
1223 pub next_in: *mut u8,
1224 #[doc = "!< number of bytes available at next_in"]
1225 pub avail_in: u32,
1226 #[doc = "!< total number of bytes read so far"]
1227 pub total_in: u32,
1228 #[doc = "!< Next output byte"]
1229 pub next_out: *mut u8,
1230 #[doc = "!< number of bytes available at next_out"]
1231 pub avail_out: u32,
1232 #[doc = "!< total number of bytes written so far"]
1233 pub total_out: u32,
1234 #[doc = "!< Huffman encoding used when compressing"]
1235 pub hufftables: *mut isal_hufftables,
1236 #[doc = "!< Compression level to use"]
1237 pub level: u32,
1238 #[doc = "!< Size of level_buf"]
1239 pub level_buf_size: u32,
1240 #[doc = "!< User allocated buffer required for different compression levels"]
1241 pub level_buf: *mut u8,
1242 #[doc = "!< non-zero if this is the last input buffer"]
1243 pub end_of_stream: u16,
1244 #[doc = "!< Flush type can be NO_FLUSH, SYNC_FLUSH or FULL_FLUSH"]
1245 pub flush: u16,
1246 #[doc = "!< Indicate if gzip compression is to be performed"]
1247 pub gzip_flag: u16,
1248 #[doc = "!< Log base 2 of maximum lookback distance, 0 is use default"]
1249 pub hist_bits: u16,
1250 #[doc = "!< Internal state for this stream"]
1251 pub internal_state: isal_zstate,
1252 }
1253 #[test]
1254 fn bindgen_test_layout_isal_zstream() {
1255 const UNINIT: ::std::mem::MaybeUninit<isal_zstream> = ::std::mem::MaybeUninit::uninit();
1256 let ptr = UNINIT.as_ptr();
1257 assert_eq!(
1258 ::std::mem::size_of::<isal_zstream>(),
1259 82384usize,
1260 concat!("Size of: ", stringify!(isal_zstream))
1261 );
1262 assert_eq!(
1263 ::std::mem::align_of::<isal_zstream>(),
1264 8usize,
1265 concat!("Alignment of ", stringify!(isal_zstream))
1266 );
1267 assert_eq!(
1268 unsafe { ::std::ptr::addr_of!((*ptr).next_in) as usize - ptr as usize },
1269 0usize,
1270 concat!(
1271 "Offset of field: ",
1272 stringify!(isal_zstream),
1273 "::",
1274 stringify!(next_in)
1275 )
1276 );
1277 assert_eq!(
1278 unsafe { ::std::ptr::addr_of!((*ptr).avail_in) as usize - ptr as usize },
1279 8usize,
1280 concat!(
1281 "Offset of field: ",
1282 stringify!(isal_zstream),
1283 "::",
1284 stringify!(avail_in)
1285 )
1286 );
1287 assert_eq!(
1288 unsafe { ::std::ptr::addr_of!((*ptr).total_in) as usize - ptr as usize },
1289 12usize,
1290 concat!(
1291 "Offset of field: ",
1292 stringify!(isal_zstream),
1293 "::",
1294 stringify!(total_in)
1295 )
1296 );
1297 assert_eq!(
1298 unsafe { ::std::ptr::addr_of!((*ptr).next_out) as usize - ptr as usize },
1299 16usize,
1300 concat!(
1301 "Offset of field: ",
1302 stringify!(isal_zstream),
1303 "::",
1304 stringify!(next_out)
1305 )
1306 );
1307 assert_eq!(
1308 unsafe { ::std::ptr::addr_of!((*ptr).avail_out) as usize - ptr as usize },
1309 24usize,
1310 concat!(
1311 "Offset of field: ",
1312 stringify!(isal_zstream),
1313 "::",
1314 stringify!(avail_out)
1315 )
1316 );
1317 assert_eq!(
1318 unsafe { ::std::ptr::addr_of!((*ptr).total_out) as usize - ptr as usize },
1319 28usize,
1320 concat!(
1321 "Offset of field: ",
1322 stringify!(isal_zstream),
1323 "::",
1324 stringify!(total_out)
1325 )
1326 );
1327 assert_eq!(
1328 unsafe { ::std::ptr::addr_of!((*ptr).hufftables) as usize - ptr as usize },
1329 32usize,
1330 concat!(
1331 "Offset of field: ",
1332 stringify!(isal_zstream),
1333 "::",
1334 stringify!(hufftables)
1335 )
1336 );
1337 assert_eq!(
1338 unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize },
1339 40usize,
1340 concat!(
1341 "Offset of field: ",
1342 stringify!(isal_zstream),
1343 "::",
1344 stringify!(level)
1345 )
1346 );
1347 assert_eq!(
1348 unsafe { ::std::ptr::addr_of!((*ptr).level_buf_size) as usize - ptr as usize },
1349 44usize,
1350 concat!(
1351 "Offset of field: ",
1352 stringify!(isal_zstream),
1353 "::",
1354 stringify!(level_buf_size)
1355 )
1356 );
1357 assert_eq!(
1358 unsafe { ::std::ptr::addr_of!((*ptr).level_buf) as usize - ptr as usize },
1359 48usize,
1360 concat!(
1361 "Offset of field: ",
1362 stringify!(isal_zstream),
1363 "::",
1364 stringify!(level_buf)
1365 )
1366 );
1367 assert_eq!(
1368 unsafe { ::std::ptr::addr_of!((*ptr).end_of_stream) as usize - ptr as usize },
1369 56usize,
1370 concat!(
1371 "Offset of field: ",
1372 stringify!(isal_zstream),
1373 "::",
1374 stringify!(end_of_stream)
1375 )
1376 );
1377 assert_eq!(
1378 unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize },
1379 58usize,
1380 concat!(
1381 "Offset of field: ",
1382 stringify!(isal_zstream),
1383 "::",
1384 stringify!(flush)
1385 )
1386 );
1387 assert_eq!(
1388 unsafe { ::std::ptr::addr_of!((*ptr).gzip_flag) as usize - ptr as usize },
1389 60usize,
1390 concat!(
1391 "Offset of field: ",
1392 stringify!(isal_zstream),
1393 "::",
1394 stringify!(gzip_flag)
1395 )
1396 );
1397 assert_eq!(
1398 unsafe { ::std::ptr::addr_of!((*ptr).hist_bits) as usize - ptr as usize },
1399 62usize,
1400 concat!(
1401 "Offset of field: ",
1402 stringify!(isal_zstream),
1403 "::",
1404 stringify!(hist_bits)
1405 )
1406 );
1407 assert_eq!(
1408 unsafe { ::std::ptr::addr_of!((*ptr).internal_state) as usize - ptr as usize },
1409 64usize,
1410 concat!(
1411 "Offset of field: ",
1412 stringify!(isal_zstream),
1413 "::",
1414 stringify!(internal_state)
1415 )
1416 );
1417 }
1418 #[doc = " @brief Large lookup table for decoding huffman codes"]
1419 #[repr(C)]
1420 #[derive(Debug, Copy, Clone)]
1421 pub struct inflate_huff_code_large {
1422 #[doc = "!< Short code lookup table"]
1423 pub short_code_lookup: [u32; 4096usize],
1424 #[doc = "!< Long code lookup table"]
1425 pub long_code_lookup: [u16; 1264usize],
1426 }
1427 #[test]
1428 fn bindgen_test_layout_inflate_huff_code_large() {
1429 const UNINIT: ::std::mem::MaybeUninit<inflate_huff_code_large> =
1430 ::std::mem::MaybeUninit::uninit();
1431 let ptr = UNINIT.as_ptr();
1432 assert_eq!(
1433 ::std::mem::size_of::<inflate_huff_code_large>(),
1434 18912usize,
1435 concat!("Size of: ", stringify!(inflate_huff_code_large))
1436 );
1437 assert_eq!(
1438 ::std::mem::align_of::<inflate_huff_code_large>(),
1439 4usize,
1440 concat!("Alignment of ", stringify!(inflate_huff_code_large))
1441 );
1442 assert_eq!(
1443 unsafe { ::std::ptr::addr_of!((*ptr).short_code_lookup) as usize - ptr as usize },
1444 0usize,
1445 concat!(
1446 "Offset of field: ",
1447 stringify!(inflate_huff_code_large),
1448 "::",
1449 stringify!(short_code_lookup)
1450 )
1451 );
1452 assert_eq!(
1453 unsafe { ::std::ptr::addr_of!((*ptr).long_code_lookup) as usize - ptr as usize },
1454 16384usize,
1455 concat!(
1456 "Offset of field: ",
1457 stringify!(inflate_huff_code_large),
1458 "::",
1459 stringify!(long_code_lookup)
1460 )
1461 );
1462 }
1463 #[doc = " @brief Small lookup table for decoding huffman codes"]
1464 #[repr(C)]
1465 #[derive(Debug, Copy, Clone)]
1466 pub struct inflate_huff_code_small {
1467 #[doc = "!< Short code lookup table"]
1468 pub short_code_lookup: [u16; 1024usize],
1469 #[doc = "!< Long code lookup table"]
1470 pub long_code_lookup: [u16; 80usize],
1471 }
1472 #[test]
1473 fn bindgen_test_layout_inflate_huff_code_small() {
1474 const UNINIT: ::std::mem::MaybeUninit<inflate_huff_code_small> =
1475 ::std::mem::MaybeUninit::uninit();
1476 let ptr = UNINIT.as_ptr();
1477 assert_eq!(
1478 ::std::mem::size_of::<inflate_huff_code_small>(),
1479 2208usize,
1480 concat!("Size of: ", stringify!(inflate_huff_code_small))
1481 );
1482 assert_eq!(
1483 ::std::mem::align_of::<inflate_huff_code_small>(),
1484 2usize,
1485 concat!("Alignment of ", stringify!(inflate_huff_code_small))
1486 );
1487 assert_eq!(
1488 unsafe { ::std::ptr::addr_of!((*ptr).short_code_lookup) as usize - ptr as usize },
1489 0usize,
1490 concat!(
1491 "Offset of field: ",
1492 stringify!(inflate_huff_code_small),
1493 "::",
1494 stringify!(short_code_lookup)
1495 )
1496 );
1497 assert_eq!(
1498 unsafe { ::std::ptr::addr_of!((*ptr).long_code_lookup) as usize - ptr as usize },
1499 2048usize,
1500 concat!(
1501 "Offset of field: ",
1502 stringify!(inflate_huff_code_small),
1503 "::",
1504 stringify!(long_code_lookup)
1505 )
1506 );
1507 }
1508 #[doc = " @brief Holds decompression state information"]
1509 #[repr(C)]
1510 #[derive(Copy, Clone)]
1511 pub struct inflate_state {
1512 #[doc = "!< Next output Byte"]
1513 pub next_out: *mut u8,
1514 #[doc = "!< Number of bytes available at next_out"]
1515 pub avail_out: u32,
1516 #[doc = "!< Total bytes written out so far"]
1517 pub total_out: u32,
1518 #[doc = "!< Next input byte"]
1519 pub next_in: *mut u8,
1520 #[doc = "!< Bits buffered to handle unaligned streams"]
1521 pub read_in: u64,
1522 #[doc = "!< Number of bytes available at next_in"]
1523 pub avail_in: u32,
1524 #[doc = "!< Bits in read_in"]
1525 pub read_in_length: i32,
1526 #[doc = "!< Structure for decoding lit/len symbols"]
1527 pub lit_huff_code: inflate_huff_code_large,
1528 #[doc = "!< Structure for decoding dist symbols"]
1529 pub dist_huff_code: inflate_huff_code_small,
1530 #[doc = "!< Current decompression state"]
1531 pub block_state: isal_block_state,
1532 #[doc = "!< Length of dictionary used"]
1533 pub dict_length: u32,
1534 #[doc = "!< Flag identifying final block"]
1535 pub bfinal: u32,
1536 #[doc = "!< Flag identifying whether to track of crc"]
1537 pub crc_flag: u32,
1538 #[doc = "!< Contains crc or adler32 of output if crc_flag is set"]
1539 pub crc: u32,
1540 #[doc = "!< Log base 2 of maximum lookback distance"]
1541 pub hist_bits: u32,
1542 pub __bindgen_anon_1: inflate_state__bindgen_ty_1,
1543 pub write_overflow_lits: i32,
1544 pub write_overflow_len: i32,
1545 #[doc = "!< Length left to copy when outbuffer overflow occurred"]
1546 pub copy_overflow_length: i32,
1547 #[doc = "!< Lookback distance when outbuffer overflow occurred"]
1548 pub copy_overflow_distance: i32,
1549 pub wrapper_flag: i16,
1550 #[doc = "!< Number of bytes in tmp_in_buffer"]
1551 pub tmp_in_size: i16,
1552 #[doc = "!< Number of bytes in tmp_out_buffer"]
1553 pub tmp_out_valid: i32,
1554 #[doc = "!< Number of bytes processed in tmp_out_buffer"]
1555 pub tmp_out_processed: i32,
1556 #[doc = "!< Temporary buffer containing data from the\n!< input stream"]
1557 pub tmp_in_buffer: [u8; 328usize],
1558 pub tmp_out_buffer: [u8; 65824usize],
1559 }
1560 #[repr(C)]
1561 #[derive(Copy, Clone)]
1562 pub union inflate_state__bindgen_ty_1 {
1563 #[doc = "!< Length left to read of type 0 block when outbuffer\n!< overflow occurred"]
1564 pub type0_block_len: i32,
1565 #[doc = "!< Count of bytes remaining to be parsed"]
1566 pub count: i32,
1567 pub dict_id: u32,
1568 }
1569 #[test]
1570 fn bindgen_test_layout_inflate_state__bindgen_ty_1() {
1571 const UNINIT: ::std::mem::MaybeUninit<inflate_state__bindgen_ty_1> =
1572 ::std::mem::MaybeUninit::uninit();
1573 let ptr = UNINIT.as_ptr();
1574 assert_eq!(
1575 ::std::mem::size_of::<inflate_state__bindgen_ty_1>(),
1576 4usize,
1577 concat!("Size of: ", stringify!(inflate_state__bindgen_ty_1))
1578 );
1579 assert_eq!(
1580 ::std::mem::align_of::<inflate_state__bindgen_ty_1>(),
1581 4usize,
1582 concat!("Alignment of ", stringify!(inflate_state__bindgen_ty_1))
1583 );
1584 assert_eq!(
1585 unsafe { ::std::ptr::addr_of!((*ptr).type0_block_len) as usize - ptr as usize },
1586 0usize,
1587 concat!(
1588 "Offset of field: ",
1589 stringify!(inflate_state__bindgen_ty_1),
1590 "::",
1591 stringify!(type0_block_len)
1592 )
1593 );
1594 assert_eq!(
1595 unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
1596 0usize,
1597 concat!(
1598 "Offset of field: ",
1599 stringify!(inflate_state__bindgen_ty_1),
1600 "::",
1601 stringify!(count)
1602 )
1603 );
1604 assert_eq!(
1605 unsafe { ::std::ptr::addr_of!((*ptr).dict_id) as usize - ptr as usize },
1606 0usize,
1607 concat!(
1608 "Offset of field: ",
1609 stringify!(inflate_state__bindgen_ty_1),
1610 "::",
1611 stringify!(dict_id)
1612 )
1613 );
1614 }
1615 #[test]
1616 fn bindgen_test_layout_inflate_state() {
1617 const UNINIT: ::std::mem::MaybeUninit<inflate_state> = ::std::mem::MaybeUninit::uninit();
1618 let ptr = UNINIT.as_ptr();
1619 assert_eq!(
1620 ::std::mem::size_of::<inflate_state>(),
1621 87368usize,
1622 concat!("Size of: ", stringify!(inflate_state))
1623 );
1624 assert_eq!(
1625 ::std::mem::align_of::<inflate_state>(),
1626 8usize,
1627 concat!("Alignment of ", stringify!(inflate_state))
1628 );
1629 assert_eq!(
1630 unsafe { ::std::ptr::addr_of!((*ptr).next_out) as usize - ptr as usize },
1631 0usize,
1632 concat!(
1633 "Offset of field: ",
1634 stringify!(inflate_state),
1635 "::",
1636 stringify!(next_out)
1637 )
1638 );
1639 assert_eq!(
1640 unsafe { ::std::ptr::addr_of!((*ptr).avail_out) as usize - ptr as usize },
1641 8usize,
1642 concat!(
1643 "Offset of field: ",
1644 stringify!(inflate_state),
1645 "::",
1646 stringify!(avail_out)
1647 )
1648 );
1649 assert_eq!(
1650 unsafe { ::std::ptr::addr_of!((*ptr).total_out) as usize - ptr as usize },
1651 12usize,
1652 concat!(
1653 "Offset of field: ",
1654 stringify!(inflate_state),
1655 "::",
1656 stringify!(total_out)
1657 )
1658 );
1659 assert_eq!(
1660 unsafe { ::std::ptr::addr_of!((*ptr).next_in) as usize - ptr as usize },
1661 16usize,
1662 concat!(
1663 "Offset of field: ",
1664 stringify!(inflate_state),
1665 "::",
1666 stringify!(next_in)
1667 )
1668 );
1669 assert_eq!(
1670 unsafe { ::std::ptr::addr_of!((*ptr).read_in) as usize - ptr as usize },
1671 24usize,
1672 concat!(
1673 "Offset of field: ",
1674 stringify!(inflate_state),
1675 "::",
1676 stringify!(read_in)
1677 )
1678 );
1679 assert_eq!(
1680 unsafe { ::std::ptr::addr_of!((*ptr).avail_in) as usize - ptr as usize },
1681 32usize,
1682 concat!(
1683 "Offset of field: ",
1684 stringify!(inflate_state),
1685 "::",
1686 stringify!(avail_in)
1687 )
1688 );
1689 assert_eq!(
1690 unsafe { ::std::ptr::addr_of!((*ptr).read_in_length) as usize - ptr as usize },
1691 36usize,
1692 concat!(
1693 "Offset of field: ",
1694 stringify!(inflate_state),
1695 "::",
1696 stringify!(read_in_length)
1697 )
1698 );
1699 assert_eq!(
1700 unsafe { ::std::ptr::addr_of!((*ptr).lit_huff_code) as usize - ptr as usize },
1701 40usize,
1702 concat!(
1703 "Offset of field: ",
1704 stringify!(inflate_state),
1705 "::",
1706 stringify!(lit_huff_code)
1707 )
1708 );
1709 assert_eq!(
1710 unsafe { ::std::ptr::addr_of!((*ptr).dist_huff_code) as usize - ptr as usize },
1711 18952usize,
1712 concat!(
1713 "Offset of field: ",
1714 stringify!(inflate_state),
1715 "::",
1716 stringify!(dist_huff_code)
1717 )
1718 );
1719 assert_eq!(
1720 unsafe { ::std::ptr::addr_of!((*ptr).block_state) as usize - ptr as usize },
1721 21160usize,
1722 concat!(
1723 "Offset of field: ",
1724 stringify!(inflate_state),
1725 "::",
1726 stringify!(block_state)
1727 )
1728 );
1729 assert_eq!(
1730 unsafe { ::std::ptr::addr_of!((*ptr).dict_length) as usize - ptr as usize },
1731 21164usize,
1732 concat!(
1733 "Offset of field: ",
1734 stringify!(inflate_state),
1735 "::",
1736 stringify!(dict_length)
1737 )
1738 );
1739 assert_eq!(
1740 unsafe { ::std::ptr::addr_of!((*ptr).bfinal) as usize - ptr as usize },
1741 21168usize,
1742 concat!(
1743 "Offset of field: ",
1744 stringify!(inflate_state),
1745 "::",
1746 stringify!(bfinal)
1747 )
1748 );
1749 assert_eq!(
1750 unsafe { ::std::ptr::addr_of!((*ptr).crc_flag) as usize - ptr as usize },
1751 21172usize,
1752 concat!(
1753 "Offset of field: ",
1754 stringify!(inflate_state),
1755 "::",
1756 stringify!(crc_flag)
1757 )
1758 );
1759 assert_eq!(
1760 unsafe { ::std::ptr::addr_of!((*ptr).crc) as usize - ptr as usize },
1761 21176usize,
1762 concat!(
1763 "Offset of field: ",
1764 stringify!(inflate_state),
1765 "::",
1766 stringify!(crc)
1767 )
1768 );
1769 assert_eq!(
1770 unsafe { ::std::ptr::addr_of!((*ptr).hist_bits) as usize - ptr as usize },
1771 21180usize,
1772 concat!(
1773 "Offset of field: ",
1774 stringify!(inflate_state),
1775 "::",
1776 stringify!(hist_bits)
1777 )
1778 );
1779 assert_eq!(
1780 unsafe { ::std::ptr::addr_of!((*ptr).write_overflow_lits) as usize - ptr as usize },
1781 21188usize,
1782 concat!(
1783 "Offset of field: ",
1784 stringify!(inflate_state),
1785 "::",
1786 stringify!(write_overflow_lits)
1787 )
1788 );
1789 assert_eq!(
1790 unsafe { ::std::ptr::addr_of!((*ptr).write_overflow_len) as usize - ptr as usize },
1791 21192usize,
1792 concat!(
1793 "Offset of field: ",
1794 stringify!(inflate_state),
1795 "::",
1796 stringify!(write_overflow_len)
1797 )
1798 );
1799 assert_eq!(
1800 unsafe { ::std::ptr::addr_of!((*ptr).copy_overflow_length) as usize - ptr as usize },
1801 21196usize,
1802 concat!(
1803 "Offset of field: ",
1804 stringify!(inflate_state),
1805 "::",
1806 stringify!(copy_overflow_length)
1807 )
1808 );
1809 assert_eq!(
1810 unsafe { ::std::ptr::addr_of!((*ptr).copy_overflow_distance) as usize - ptr as usize },
1811 21200usize,
1812 concat!(
1813 "Offset of field: ",
1814 stringify!(inflate_state),
1815 "::",
1816 stringify!(copy_overflow_distance)
1817 )
1818 );
1819 assert_eq!(
1820 unsafe { ::std::ptr::addr_of!((*ptr).wrapper_flag) as usize - ptr as usize },
1821 21204usize,
1822 concat!(
1823 "Offset of field: ",
1824 stringify!(inflate_state),
1825 "::",
1826 stringify!(wrapper_flag)
1827 )
1828 );
1829 assert_eq!(
1830 unsafe { ::std::ptr::addr_of!((*ptr).tmp_in_size) as usize - ptr as usize },
1831 21206usize,
1832 concat!(
1833 "Offset of field: ",
1834 stringify!(inflate_state),
1835 "::",
1836 stringify!(tmp_in_size)
1837 )
1838 );
1839 assert_eq!(
1840 unsafe { ::std::ptr::addr_of!((*ptr).tmp_out_valid) as usize - ptr as usize },
1841 21208usize,
1842 concat!(
1843 "Offset of field: ",
1844 stringify!(inflate_state),
1845 "::",
1846 stringify!(tmp_out_valid)
1847 )
1848 );
1849 assert_eq!(
1850 unsafe { ::std::ptr::addr_of!((*ptr).tmp_out_processed) as usize - ptr as usize },
1851 21212usize,
1852 concat!(
1853 "Offset of field: ",
1854 stringify!(inflate_state),
1855 "::",
1856 stringify!(tmp_out_processed)
1857 )
1858 );
1859 assert_eq!(
1860 unsafe { ::std::ptr::addr_of!((*ptr).tmp_in_buffer) as usize - ptr as usize },
1861 21216usize,
1862 concat!(
1863 "Offset of field: ",
1864 stringify!(inflate_state),
1865 "::",
1866 stringify!(tmp_in_buffer)
1867 )
1868 );
1869 assert_eq!(
1870 unsafe { ::std::ptr::addr_of!((*ptr).tmp_out_buffer) as usize - ptr as usize },
1871 21544usize,
1872 concat!(
1873 "Offset of field: ",
1874 stringify!(inflate_state),
1875 "::",
1876 stringify!(tmp_out_buffer)
1877 )
1878 );
1879 }
1880 extern "C" {
1881 #[doc = "/\n/**\n @brief Updates histograms to include the symbols found in the input\n stream. Since this function only updates the histograms, it can be called on\n multiple streams to get a histogram better representing the desired data\n set. When first using histogram it must be initialized by zeroing the\n structure.\n\n @param in_stream: Input stream of data.\n @param length: The length of start_stream.\n @param histogram: The returned histogram of lit/len/dist symbols."]
1882 pub fn isal_update_histogram(
1883 in_stream: *mut u8,
1884 length: ::std::os::raw::c_int,
1885 histogram: *mut isal_huff_histogram,
1886 );
1887 }
1888 extern "C" {
1889 #[doc = " @brief Creates a custom huffman code for the given histograms in which\n every literal and repeat length is assigned a code and all possible lookback\n distances are assigned a code.\n\n @param hufftables: the output structure containing the huffman code\n @param histogram: histogram containing frequency of literal symbols,\n repeat lengths and lookback distances\n @returns Returns a non zero value if an invalid huffman code was created."]
1890 pub fn isal_create_hufftables(
1891 hufftables: *mut isal_hufftables,
1892 histogram: *mut isal_huff_histogram,
1893 ) -> ::std::os::raw::c_int;
1894 }
1895 extern "C" {
1896 #[doc = " @brief Creates a custom huffman code for the given histograms like\n isal_create_hufftables() except literals with 0 frequency in the histogram\n are not assigned a code\n\n @param hufftables: the output structure containing the huffman code\n @param histogram: histogram containing frequency of literal symbols,\n repeat lengths and lookback distances\n @returns Returns a non zero value if an invalid huffman code was created."]
1897 pub fn isal_create_hufftables_subset(
1898 hufftables: *mut isal_hufftables,
1899 histogram: *mut isal_huff_histogram,
1900 ) -> ::std::os::raw::c_int;
1901 }
1902 extern "C" {
1903 #[doc = " @brief Initialize compression stream data structure\n\n @param stream Structure holding state information on the compression streams.\n @returns none"]
1904 pub fn isal_deflate_init(stream: *mut isal_zstream);
1905 }
1906 extern "C" {
1907 #[doc = " @brief Reinitialize compression stream data structure. Performs the same\n action as isal_deflate_init, but does not change user supplied input such as\n the level, flush type, compression wrapper (like gzip), hufftables, and\n end_of_stream_flag.\n\n @param stream Structure holding state information on the compression streams.\n @returns none"]
1908 pub fn isal_deflate_reset(stream: *mut isal_zstream);
1909 }
1910 extern "C" {
1911 #[doc = " @brief Set gzip header default values\n\n @param gz_hdr: Gzip header to initialize."]
1912 pub fn isal_gzip_header_init(gz_hdr: *mut isal_gzip_header);
1913 }
1914 extern "C" {
1915 #[doc = " @brief Set zlib header default values\n\n @param z_hdr: zlib header to initialize."]
1916 pub fn isal_zlib_header_init(z_hdr: *mut isal_zlib_header);
1917 }
1918 extern "C" {
1919 #[doc = " @brief Write gzip header to output stream\n\n Writes the gzip header to the output stream. On entry this function assumes\n that the output buffer has been initialized, so stream->next_out,\n stream->avail_out and stream->total_out have been set. If the output buffer\n contains insufficient space, stream is not modified.\n\n @param stream: Structure holding state information on the compression stream.\n @param gz_hdr: Structure holding the gzip header information to encode.\n\n @returns Returns 0 if the header is successfully written, otherwise returns\n the minimum size required to successfully write the gzip header to the output\n buffer."]
1920 pub fn isal_write_gzip_header(
1921 stream: *mut isal_zstream,
1922 gz_hdr: *mut isal_gzip_header,
1923 ) -> u32;
1924 }
1925 extern "C" {
1926 #[doc = " @brief Write zlib header to output stream\n\n Writes the zlib header to the output stream. On entry this function assumes\n that the output buffer has been initialized, so stream->next_out,\n stream->avail_out and stream->total_out have been set. If the output buffer\n contains insufficient space, stream is not modified.\n\n @param stream: Structure holding state information on the compression stream.\n @param z_hdr: Structure holding the zlib header information to encode.\n\n @returns Returns 0 if the header is successfully written, otherwise returns\n the minimum size required to successfully write the zlib header to the output\n buffer."]
1927 pub fn isal_write_zlib_header(
1928 stream: *mut isal_zstream,
1929 z_hdr: *mut isal_zlib_header,
1930 ) -> u32;
1931 }
1932 extern "C" {
1933 #[doc = " @brief Set stream to use a new Huffman code\n\n Sets the Huffman code to be used in compression before compression start or\n after the successful completion of a SYNC_FLUSH or FULL_FLUSH. If type has\n value IGZIP_HUFFTABLE_DEFAULT, the stream is set to use the default Huffman\n code. If type has value IGZIP_HUFFTABLE_STATIC, the stream is set to use the\n deflate standard static Huffman code, or if type has value\n IGZIP_HUFFTABLE_CUSTOM, the stream is set to sue the isal_hufftables\n structure input to isal_deflate_set_hufftables.\n\n @param stream: Structure holding state information on the compression stream.\n @param hufftables: new huffman code to use if type is set to\n IGZIP_HUFFTABLE_CUSTOM.\n @param type: Flag specifying what hufftable to use.\n\n @returns Returns INVALID_OPERATION if the stream was unmodified. This may be\n due to the stream being in a state where changing the huffman code is not\n allowed or an invalid input is provided."]
1934 pub fn isal_deflate_set_hufftables(
1935 stream: *mut isal_zstream,
1936 hufftables: *mut isal_hufftables,
1937 type_: ::std::os::raw::c_int,
1938 ) -> ::std::os::raw::c_int;
1939 }
1940 extern "C" {
1941 #[doc = " @brief Initialize compression stream data structure\n\n @param stream Structure holding state information on the compression streams.\n @returns none"]
1942 pub fn isal_deflate_stateless_init(stream: *mut isal_zstream);
1943 }
1944 extern "C" {
1945 #[doc = " @brief Set compression dictionary to use\n\n This function is to be called after isal_deflate_init, or after completing a\n SYNC_FLUSH or FULL_FLUSH and before the next call do isal_deflate. If the\n dictionary is longer than IGZIP_HIST_SIZE, only the last IGZIP_HIST_SIZE\n bytes will be used.\n\n @param stream Structure holding state information on the compression streams.\n @param dict: Array containing dictionary to use.\n @param dict_len: Length of dict.\n @returns COMP_OK,\n ISAL_INVALID_STATE (dictionary could not be set)"]
1946 pub fn isal_deflate_set_dict(
1947 stream: *mut isal_zstream,
1948 dict: *mut u8,
1949 dict_len: u32,
1950 ) -> ::std::os::raw::c_int;
1951 }
1952 #[doc = " @brief Structure for holding processed dictionary information"]
1953 #[repr(C)]
1954 #[derive(Debug, Copy, Clone)]
1955 pub struct isal_dict {
1956 pub params: u32,
1957 pub level: u32,
1958 pub hist_size: u32,
1959 pub hash_size: u32,
1960 pub history: [u8; 32768usize],
1961 pub hashtable: [u16; 32768usize],
1962 }
1963 #[test]
1964 fn bindgen_test_layout_isal_dict() {
1965 const UNINIT: ::std::mem::MaybeUninit<isal_dict> = ::std::mem::MaybeUninit::uninit();
1966 let ptr = UNINIT.as_ptr();
1967 assert_eq!(
1968 ::std::mem::size_of::<isal_dict>(),
1969 98320usize,
1970 concat!("Size of: ", stringify!(isal_dict))
1971 );
1972 assert_eq!(
1973 ::std::mem::align_of::<isal_dict>(),
1974 4usize,
1975 concat!("Alignment of ", stringify!(isal_dict))
1976 );
1977 assert_eq!(
1978 unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize },
1979 0usize,
1980 concat!(
1981 "Offset of field: ",
1982 stringify!(isal_dict),
1983 "::",
1984 stringify!(params)
1985 )
1986 );
1987 assert_eq!(
1988 unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize },
1989 4usize,
1990 concat!(
1991 "Offset of field: ",
1992 stringify!(isal_dict),
1993 "::",
1994 stringify!(level)
1995 )
1996 );
1997 assert_eq!(
1998 unsafe { ::std::ptr::addr_of!((*ptr).hist_size) as usize - ptr as usize },
1999 8usize,
2000 concat!(
2001 "Offset of field: ",
2002 stringify!(isal_dict),
2003 "::",
2004 stringify!(hist_size)
2005 )
2006 );
2007 assert_eq!(
2008 unsafe { ::std::ptr::addr_of!((*ptr).hash_size) as usize - ptr as usize },
2009 12usize,
2010 concat!(
2011 "Offset of field: ",
2012 stringify!(isal_dict),
2013 "::",
2014 stringify!(hash_size)
2015 )
2016 );
2017 assert_eq!(
2018 unsafe { ::std::ptr::addr_of!((*ptr).history) as usize - ptr as usize },
2019 16usize,
2020 concat!(
2021 "Offset of field: ",
2022 stringify!(isal_dict),
2023 "::",
2024 stringify!(history)
2025 )
2026 );
2027 assert_eq!(
2028 unsafe { ::std::ptr::addr_of!((*ptr).hashtable) as usize - ptr as usize },
2029 32784usize,
2030 concat!(
2031 "Offset of field: ",
2032 stringify!(isal_dict),
2033 "::",
2034 stringify!(hashtable)
2035 )
2036 );
2037 }
2038 extern "C" {
2039 #[doc = " @brief Process dictionary to reuse later\n\n Processes a dictionary so that the generated output can be reused to reset a\n new deflate stream more quickly than isal_deflate_set_dict() alone. This\n function is paired with isal_deflate_reset_dict() when using the same\n dictionary on multiple deflate objects. The stream.level must be set prior to\n calling this function to process the dictionary correctly. If the dictionary\n is longer than IGZIP_HIST_SIZE, only the last IGZIP_HIST_SIZE bytes will be\n used.\n\n @param stream Structure holding state information on the compression streams.\n @param dict_str: Structure to hold processed dictionary info to reuse later.\n @param dict: Array containing dictionary to use.\n @param dict_len: Length of dict.\n @returns COMP_OK,\n ISAL_INVALID_STATE (dictionary could not be processed)"]
2040 pub fn isal_deflate_process_dict(
2041 stream: *mut isal_zstream,
2042 dict_str: *mut isal_dict,
2043 dict: *mut u8,
2044 dict_len: u32,
2045 ) -> ::std::os::raw::c_int;
2046 }
2047 extern "C" {
2048 #[doc = " @brief Reset compression dictionary to use\n\n Similar to isal_deflate_set_dict() but on pre-processed dictionary\n data. Pairing with isal_deflate_process_dict() can reduce the processing time\n on subsequent compression with dictionary especially on small files.\n\n Like isal_deflate_set_dict(), this function is to be called after\n isal_deflate_init, or after completing a SYNC_FLUSH or FULL_FLUSH and before\n the next call do isal_deflate. Changing compression level between dictionary\n process and reset will cause return of ISAL_INVALID_STATE.\n\n @param stream Structure holding state information on the compression streams.\n @param dict_str: Structure with pre-processed dictionary info.\n @returns COMP_OK,\n ISAL_INVALID_STATE or other (dictionary could not be reset)"]
2049 pub fn isal_deflate_reset_dict(
2050 stream: *mut isal_zstream,
2051 dict_str: *mut isal_dict,
2052 ) -> ::std::os::raw::c_int;
2053 }
2054 extern "C" {
2055 #[doc = " @brief Fast data (deflate) compression for storage applications.\n\n The call to isal_deflate() will take data from the input buffer (updating\n next_in, avail_in and write a compressed stream to the output buffer\n (updating next_out and avail_out). The function returns when either the input\n buffer is empty or the output buffer is full.\n\n On entry to isal_deflate(), next_in points to an input buffer and avail_in\n indicates the length of that buffer. Similarly next_out points to an empty\n output buffer and avail_out indicates the size of that buffer.\n\n The fields total_in and total_out start at 0 and are updated by\n isal_deflate(). These reflect the total number of bytes read or written so far.\n\n When the last input buffer is passed in, signaled by setting the\n end_of_stream, the routine will complete compression at the end of the input\n buffer, as long as the output buffer is big enough.\n\n The compression level can be set by setting level to any value between\n ISAL_DEF_MIN_LEVEL and ISAL_DEF_MAX_LEVEL. When the compression level is\n ISAL_DEF_MIN_LEVEL, hufftables can be set to a table trained for the the\n specific data type being compressed to achieve better compression. When a\n higher compression level is desired, a larger generic memory buffer needs to\n be supplied by setting level_buf and level_buf_size to represent the chunk of\n memory. For level x, the suggest size for this buffer this buffer is\n ISAL_DEFL_LVLx_DEFAULT. The defines ISAL_DEFL_LVLx_MIN, ISAL_DEFL_LVLx_SMALL,\n ISAL_DEFL_LVLx_MEDIUM, ISAL_DEFL_LVLx_LARGE, and ISAL_DEFL_LVLx_EXTRA_LARGE\n are also provided as other suggested sizes.\n\n The equivalent of the zlib FLUSH_SYNC operation is currently supported.\n Flush types can be NO_FLUSH, SYNC_FLUSH or FULL_FLUSH. Default flush type is\n NO_FLUSH. A SYNC_ OR FULL_ flush will byte align the deflate block by\n appending an empty stored block once all input has been compressed, including\n the buffered input. Checking that the out_buffer is not empty or that\n internal_state.state = ZSTATE_NEW_HDR is sufficient to guarantee all input\n has been flushed. Additionally FULL_FLUSH will ensure look back history does\n not include previous blocks so new blocks are fully independent. Switching\n between flush types is supported.\n\n If a compression dictionary is required, the dictionary can be set calling\n isal_deflate_set_dictionary before calling isal_deflate.\n\n If the gzip_flag is set to IGZIP_GZIP, a generic gzip header and the gzip\n trailer are written around the deflate compressed data. If gzip_flag is set\n to IGZIP_GZIP_NO_HDR, then only the gzip trailer is written. A full-featured\n header is supported by the isal_write_{gzip,zlib}_header() functions.\n\n @param stream Structure holding state information on the compression streams.\n @return COMP_OK (if everything is ok),\n INVALID_FLUSH (if an invalid FLUSH is selected),\n ISAL_INVALID_LEVEL (if an invalid compression level is selected),\n ISAL_INVALID_LEVEL_BUF (if the level buffer is not large enough)."]
2056 pub fn isal_deflate(stream: *mut isal_zstream) -> ::std::os::raw::c_int;
2057 }
2058 extern "C" {
2059 #[doc = " @brief Fast data (deflate) stateless compression for storage applications.\n\n Stateless (one shot) compression routine with a similar interface to\n isal_deflate() but operates on entire input buffer at one time. Parameter\n avail_out must be large enough to fit the entire compressed output. Max\n expansion is limited to the input size plus the header size of a stored/raw\n block.\n\n When the compression level is set to 1, unlike in isal_deflate(), level_buf\n may be optionally set depending on what what performance is desired.\n\n For stateless the flush types NO_FLUSH and FULL_FLUSH are supported.\n FULL_FLUSH will byte align the output deflate block so additional blocks can\n be easily appended.\n\n If the gzip_flag is set to IGZIP_GZIP, a generic gzip header and the gzip\n trailer are written around the deflate compressed data. If gzip_flag is set\n to IGZIP_GZIP_NO_HDR, then only the gzip trailer is written.\n\n @param stream Structure holding state information on the compression streams.\n @return COMP_OK (if everything is ok),\n INVALID_FLUSH (if an invalid FLUSH is selected),\n ISAL_INVALID_LEVEL (if an invalid compression level is selected),\n ISAL_INVALID_LEVEL_BUF (if the level buffer is not large enough),\n STATELESS_OVERFLOW (if output buffer will not fit output)."]
2060 pub fn isal_deflate_stateless(stream: *mut isal_zstream) -> ::std::os::raw::c_int;
2061 }
2062 extern "C" {
2063 #[doc = "/\n/**\n @brief Initialize decompression state data structure\n\n @param state Structure holding state information on the compression streams.\n @returns none"]
2064 pub fn isal_inflate_init(state: *mut inflate_state);
2065 }
2066 extern "C" {
2067 #[doc = " @brief Reinitialize decompression state data structure\n\n @param state Structure holding state information on the compression streams.\n @returns none"]
2068 pub fn isal_inflate_reset(state: *mut inflate_state);
2069 }
2070 extern "C" {
2071 #[doc = " @brief Set decompression dictionary to use\n\n This function is to be called after isal_inflate_init. If the dictionary is\n longer than IGZIP_HIST_SIZE, only the last IGZIP_HIST_SIZE bytes will be\n used.\n\n @param state: Structure holding state information on the decompression stream.\n @param dict: Array containing dictionary to use.\n @param dict_len: Length of dict.\n @returns COMP_OK,\n ISAL_INVALID_STATE (dictionary could not be set)"]
2072 pub fn isal_inflate_set_dict(
2073 state: *mut inflate_state,
2074 dict: *mut u8,
2075 dict_len: u32,
2076 ) -> ::std::os::raw::c_int;
2077 }
2078 extern "C" {
2079 #[doc = " @brief Read and return gzip header information\n\n On entry state must be initialized and next_in pointing to a gzip compressed\n buffer. The buffers gz_hdr->extra, gz_hdr->name, gz_hdr->comments and the\n buffer lengths must be set to record the corresponding field, or set to NULL\n to disregard that gzip header information. If one of these buffers overflows,\n the user can reallocate a larger buffer and call this function again to\n continue reading the header information.\n\n @param state: Structure holding state information on the decompression stream.\n @param gz_hdr: Structure to return data encoded in the gzip header\n @returns ISAL_DECOMP_OK (header was successfully parsed)\n ISAL_END_INPUT (all input was parsed),\n ISAL_NAME_OVERFLOW (gz_hdr->name overflowed while parsing),\n ISAL_COMMENT_OVERFLOW (gz_hdr->comment overflowed while parsing),\n ISAL_EXTRA_OVERFLOW (gz_hdr->extra overflowed while parsing),\n ISAL_INVALID_WRAPPER (invalid gzip header found),\n ISAL_UNSUPPORTED_METHOD (deflate is not the compression method),\n ISAL_INCORRECT_CHECKSUM (gzip header checksum was incorrect)"]
2080 pub fn isal_read_gzip_header(
2081 state: *mut inflate_state,
2082 gz_hdr: *mut isal_gzip_header,
2083 ) -> ::std::os::raw::c_int;
2084 }
2085 extern "C" {
2086 #[doc = " @brief Read and return zlib header information\n\n On entry state must be initialized and next_in pointing to a zlib compressed\n buffer.\n\n @param state: Structure holding state information on the decompression stream.\n @param zlib_hdr: Structure to return data encoded in the zlib header\n @returns ISAL_DECOMP_OK (header was successfully parsed),\n ISAL_END_INPUT (all input was parsed),\n ISAL_UNSUPPORTED_METHOD (deflate is not the compression method),\n ISAL_INCORRECT_CHECKSUM (zlib header checksum was incorrect)"]
2087 pub fn isal_read_zlib_header(
2088 state: *mut inflate_state,
2089 zlib_hdr: *mut isal_zlib_header,
2090 ) -> ::std::os::raw::c_int;
2091 }
2092 extern "C" {
2093 #[doc = " @brief Fast data (deflate) decompression for storage applications.\n\n On entry to isal_inflate(), next_in points to an input buffer and avail_in\n indicates the length of that buffer. Similarly next_out points to an empty\n output buffer and avail_out indicates the size of that buffer.\n\n The field total_out starts at 0 and is updated by isal_inflate(). This\n reflects the total number of bytes written so far.\n\n The call to isal_inflate() will take data from the input buffer (updating\n next_in, avail_in and write a decompressed stream to the output buffer\n (updating next_out and avail_out). The function returns when the input buffer\n is empty, the output buffer is full, invalid data is found, or in the case of\n zlib formatted data if a dictionary is specified. The current state of the\n decompression on exit can be read from state->block-state.\n\n If the crc_flag is set to ISAL_GZIP_NO_HDR the gzip crc of the output is\n stored in state->crc. Alternatively, if the crc_flag is set to\n ISAL_ZLIB_NO_HDR the adler32 of the output is stored in state->crc (checksum\n may not be updated until decompression is complete). When the crc_flag is set\n to ISAL_GZIP_NO_HDR_VER or ISAL_ZLIB_NO_HDR_VER, the behavior is the same,\n except the checksum is verified with the checksum after immediately following\n the deflate data. If the crc_flag is set to ISAL_GZIP or ISAL_ZLIB, the\n gzip/zlib header is parsed, state->crc is set to the appropriate checksum,\n and the checksum is verified. If the crc_flag is set to ISAL_DEFLATE\n (default), then the data is treated as a raw deflate block.\n\n The element state->hist_bits has values from 0 to 15, where values of 1 to 15\n are the log base 2 size of the matching window and 0 is the default with\n maximum history size.\n\n If a dictionary is required, a call to isal_inflate_set_dict will set the\n dictionary.\n\n @param state Structure holding state information on the compression streams.\n @return ISAL_DECOMP_OK (if everything is ok),\n ISAL_INVALID_BLOCK,\n ISAL_NEED_DICT,\n ISAL_INVALID_SYMBOL,\n ISAL_INVALID_LOOKBACK,\n ISAL_INVALID_WRAPPER,\n ISAL_UNSUPPORTED_METHOD,\n ISAL_INCORRECT_CHECKSUM."]
2094 pub fn isal_inflate(state: *mut inflate_state) -> ::std::os::raw::c_int;
2095 }
2096 extern "C" {
2097 #[doc = " @brief Fast data (deflate) stateless decompression for storage applications.\n\n Stateless (one shot) decompression routine with a similar interface to\n isal_inflate() but operates on entire input buffer at one time. Parameter\n avail_out must be large enough to fit the entire decompressed\n output. Dictionaries are not supported.\n\n @param state Structure holding state information on the compression streams.\n @return ISAL_DECOMP_OK (if everything is ok),\n ISAL_END_INPUT (if all input was decompressed),\n ISAL_NEED_DICT,\n ISAL_OUT_OVERFLOW (if output buffer ran out of space),\n ISAL_INVALID_BLOCK,\n ISAL_INVALID_SYMBOL,\n ISAL_INVALID_LOOKBACK,\n ISAL_INVALID_WRAPPER,\n ISAL_UNSUPPORTED_METHOD,\n ISAL_INCORRECT_CHECKSUM."]
2098 pub fn isal_inflate_stateless(state: *mut inflate_state) -> ::std::os::raw::c_int;
2099 }
2100 extern "C" {
2101 #[doc = "/\n/**\n @brief Calculate Adler-32 checksum, runs appropriate version.\n\n This function determines what instruction sets are enabled and selects the\n appropriate version at runtime.\n\n @param init: initial Adler-32 value\n @param buf: buffer to calculate checksum on\n @param len: buffer length in bytes\n\n @returns 32-bit Adler-32 checksum"]
2102 pub fn isal_adler32(init: u32, buf: *const ::std::os::raw::c_uchar, len: u64) -> u32;
2103 }
2104}