1 /*
2 This file is auto-generated from the public API of the zstd library.
3 It is released under the same BSD license.
4 
5 BSD License
6 
7 For Zstandard software
8 
9 Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
10 
11 Redistribution and use in source and binary forms, with or without modification,
12 are permitted provided that the following conditions are met:
13 
14  * Redistributions of source code must retain the above copyright notice, this
15    list of conditions and the following disclaimer.
16 
17  * Redistributions in binary form must reproduce the above copyright notice,
18    this list of conditions and the following disclaimer in the documentation
19    and/or other materials provided with the distribution.
20 
21  * Neither the name Facebook nor the names of its contributors may be used to
22    endorse or promote products derived from this software without specific
23    prior written permission.
24 
25 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
26 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
29 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
32 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 */
36 /* automatically generated by rust-bindgen 0.56.0 */
37 
38 pub const _LIBC_LIMITS_H_: u32 = 1;
39 pub const _FEATURES_H: u32 = 1;
40 pub const _DEFAULT_SOURCE: u32 = 1;
41 pub const __GLIBC_USE_ISOC2X: u32 = 0;
42 pub const __USE_ISOC11: u32 = 1;
43 pub const __USE_ISOC99: u32 = 1;
44 pub const __USE_ISOC95: u32 = 1;
45 pub const __USE_POSIX_IMPLICITLY: u32 = 1;
46 pub const _POSIX_SOURCE: u32 = 1;
47 pub const _POSIX_C_SOURCE: u32 = 200809;
48 pub const __USE_POSIX: u32 = 1;
49 pub const __USE_POSIX2: u32 = 1;
50 pub const __USE_POSIX199309: u32 = 1;
51 pub const __USE_POSIX199506: u32 = 1;
52 pub const __USE_XOPEN2K: u32 = 1;
53 pub const __USE_XOPEN2K8: u32 = 1;
54 pub const _ATFILE_SOURCE: u32 = 1;
55 pub const __USE_MISC: u32 = 1;
56 pub const __USE_ATFILE: u32 = 1;
57 pub const __USE_FORTIFY_LEVEL: u32 = 0;
58 pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
59 pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
60 pub const _STDC_PREDEF_H: u32 = 1;
61 pub const __STDC_IEC_559__: u32 = 1;
62 pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
63 pub const __STDC_ISO_10646__: u32 = 201706;
64 pub const __GNU_LIBRARY__: u32 = 6;
65 pub const __GLIBC__: u32 = 2;
66 pub const __GLIBC_MINOR__: u32 = 32;
67 pub const _SYS_CDEFS_H: u32 = 1;
68 pub const __glibc_c99_flexarr_available: u32 = 1;
69 pub const __WORDSIZE: u32 = 64;
70 pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
71 pub const __SYSCALL_WORDSIZE: u32 = 64;
72 pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
73 pub const __HAVE_GENERIC_SELECTION: u32 = 1;
74 pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
75 pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
76 pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
77 pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
78 pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
79 pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
80 pub const MB_LEN_MAX: u32 = 16;
81 pub const _BITS_POSIX1_LIM_H: u32 = 1;
82 pub const _POSIX_AIO_LISTIO_MAX: u32 = 2;
83 pub const _POSIX_AIO_MAX: u32 = 1;
84 pub const _POSIX_ARG_MAX: u32 = 4096;
85 pub const _POSIX_CHILD_MAX: u32 = 25;
86 pub const _POSIX_DELAYTIMER_MAX: u32 = 32;
87 pub const _POSIX_HOST_NAME_MAX: u32 = 255;
88 pub const _POSIX_LINK_MAX: u32 = 8;
89 pub const _POSIX_LOGIN_NAME_MAX: u32 = 9;
90 pub const _POSIX_MAX_CANON: u32 = 255;
91 pub const _POSIX_MAX_INPUT: u32 = 255;
92 pub const _POSIX_MQ_OPEN_MAX: u32 = 8;
93 pub const _POSIX_MQ_PRIO_MAX: u32 = 32;
94 pub const _POSIX_NAME_MAX: u32 = 14;
95 pub const _POSIX_NGROUPS_MAX: u32 = 8;
96 pub const _POSIX_OPEN_MAX: u32 = 20;
97 pub const _POSIX_PATH_MAX: u32 = 256;
98 pub const _POSIX_PIPE_BUF: u32 = 512;
99 pub const _POSIX_RE_DUP_MAX: u32 = 255;
100 pub const _POSIX_RTSIG_MAX: u32 = 8;
101 pub const _POSIX_SEM_NSEMS_MAX: u32 = 256;
102 pub const _POSIX_SEM_VALUE_MAX: u32 = 32767;
103 pub const _POSIX_SIGQUEUE_MAX: u32 = 32;
104 pub const _POSIX_SSIZE_MAX: u32 = 32767;
105 pub const _POSIX_STREAM_MAX: u32 = 8;
106 pub const _POSIX_SYMLINK_MAX: u32 = 255;
107 pub const _POSIX_SYMLOOP_MAX: u32 = 8;
108 pub const _POSIX_TIMER_MAX: u32 = 32;
109 pub const _POSIX_TTY_NAME_MAX: u32 = 9;
110 pub const _POSIX_TZNAME_MAX: u32 = 6;
111 pub const _POSIX_CLOCKRES_MIN: u32 = 20000000;
112 pub const NR_OPEN: u32 = 1024;
113 pub const NGROUPS_MAX: u32 = 65536;
114 pub const ARG_MAX: u32 = 131072;
115 pub const LINK_MAX: u32 = 127;
116 pub const MAX_CANON: u32 = 255;
117 pub const MAX_INPUT: u32 = 255;
118 pub const NAME_MAX: u32 = 255;
119 pub const PATH_MAX: u32 = 4096;
120 pub const PIPE_BUF: u32 = 4096;
121 pub const XATTR_NAME_MAX: u32 = 255;
122 pub const XATTR_SIZE_MAX: u32 = 65536;
123 pub const XATTR_LIST_MAX: u32 = 65536;
124 pub const RTSIG_MAX: u32 = 32;
125 pub const _POSIX_THREAD_KEYS_MAX: u32 = 128;
126 pub const PTHREAD_KEYS_MAX: u32 = 1024;
127 pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
128 pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
129 pub const _POSIX_THREAD_THREADS_MAX: u32 = 64;
130 pub const AIO_PRIO_DELTA_MAX: u32 = 20;
131 pub const PTHREAD_STACK_MIN: u32 = 16384;
132 pub const DELAYTIMER_MAX: u32 = 2147483647;
133 pub const TTY_NAME_MAX: u32 = 32;
134 pub const LOGIN_NAME_MAX: u32 = 256;
135 pub const HOST_NAME_MAX: u32 = 64;
136 pub const MQ_PRIO_MAX: u32 = 32768;
137 pub const SEM_VALUE_MAX: u32 = 2147483647;
138 pub const _BITS_POSIX2_LIM_H: u32 = 1;
139 pub const _POSIX2_BC_BASE_MAX: u32 = 99;
140 pub const _POSIX2_BC_DIM_MAX: u32 = 2048;
141 pub const _POSIX2_BC_SCALE_MAX: u32 = 99;
142 pub const _POSIX2_BC_STRING_MAX: u32 = 1000;
143 pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2;
144 pub const _POSIX2_EXPR_NEST_MAX: u32 = 32;
145 pub const _POSIX2_LINE_MAX: u32 = 2048;
146 pub const _POSIX2_RE_DUP_MAX: u32 = 255;
147 pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14;
148 pub const BC_BASE_MAX: u32 = 99;
149 pub const BC_DIM_MAX: u32 = 2048;
150 pub const BC_SCALE_MAX: u32 = 99;
151 pub const BC_STRING_MAX: u32 = 1000;
152 pub const COLL_WEIGHTS_MAX: u32 = 255;
153 pub const EXPR_NEST_MAX: u32 = 32;
154 pub const LINE_MAX: u32 = 2048;
155 pub const CHARCLASS_NAME_MAX: u32 = 2048;
156 pub const RE_DUP_MAX: u32 = 32767;
157 pub const ZSTD_VERSION_MAJOR: u32 = 1;
158 pub const ZSTD_VERSION_MINOR: u32 = 4;
159 pub const ZSTD_VERSION_RELEASE: u32 = 7;
160 pub const ZSTD_VERSION_NUMBER: u32 = 10407;
161 pub const ZSTD_CLEVEL_DEFAULT: u32 = 3;
162 pub const ZSTD_MAGICNUMBER: u32 = 4247762216;
163 pub const ZSTD_MAGIC_DICTIONARY: u32 = 3962610743;
164 pub const ZSTD_MAGIC_SKIPPABLE_START: u32 = 407710288;
165 pub const ZSTD_MAGIC_SKIPPABLE_MASK: u32 = 4294967280;
166 pub const ZSTD_BLOCKSIZELOG_MAX: u32 = 17;
167 pub const ZSTD_BLOCKSIZE_MAX: u32 = 131072;
168 pub const ZSTD_CONTENTSIZE_UNKNOWN: i32 = -1;
169 pub const ZSTD_CONTENTSIZE_ERROR: i32 = -2;
170 pub type wchar_t = ::std::os::raw::c_int;
171 extern "C" {
172     #[doc = " ZSTD_versionNumber() :"]
173     #[doc = "  Return runtime library version, the value is (MAJOR*100*100 + MINOR*100 + RELEASE)."]
ZSTD_versionNumber() -> ::std::os::raw::c_uint174     pub fn ZSTD_versionNumber() -> ::std::os::raw::c_uint;
175 }
176 extern "C" {
177     #[doc = " ZSTD_versionString() :"]
178     #[doc = "  Return runtime library version, like \"1.4.5\". Requires v1.3.0+."]
ZSTD_versionString() -> *const ::std::os::raw::c_char179     pub fn ZSTD_versionString() -> *const ::std::os::raw::c_char;
180 }
181 extern "C" {
182     #[doc = "  Simple API"]
183     #[doc = "  Compresses `src` content as a single zstd compressed frame into already allocated `dst`."]
184     #[doc = "  Hint : compression runs faster if `dstCapacity` >=  `ZSTD_compressBound(srcSize)`."]
185     #[doc = "  @return : compressed size written into `dst` (<= `dstCapacity),"]
186     #[doc = "            or an error code if it fails (which can be tested using ZSTD_isError())."]
ZSTD_compress( dst: *mut ::core::ffi::c_void, dstCapacity: usize, src: *const ::core::ffi::c_void, srcSize: usize, compressionLevel: ::std::os::raw::c_int, ) -> usize187     pub fn ZSTD_compress(
188         dst: *mut ::core::ffi::c_void,
189         dstCapacity: usize,
190         src: *const ::core::ffi::c_void,
191         srcSize: usize,
192         compressionLevel: ::std::os::raw::c_int,
193     ) -> usize;
194 }
195 extern "C" {
196     #[doc = " ZSTD_decompress() :"]
197     #[doc = "  `compressedSize` : must be the _exact_ size of some number of compressed and/or skippable frames."]
198     #[doc = "  `dstCapacity` is an upper bound of originalSize to regenerate."]
199     #[doc = "  If user cannot imply a maximum upper bound, it's better to use streaming mode to decompress data."]
200     #[doc = "  @return : the number of bytes decompressed into `dst` (<= `dstCapacity`),"]
201     #[doc = "            or an errorCode if it fails (which can be tested using ZSTD_isError())."]
ZSTD_decompress( dst: *mut ::core::ffi::c_void, dstCapacity: usize, src: *const ::core::ffi::c_void, compressedSize: usize, ) -> usize202     pub fn ZSTD_decompress(
203         dst: *mut ::core::ffi::c_void,
204         dstCapacity: usize,
205         src: *const ::core::ffi::c_void,
206         compressedSize: usize,
207     ) -> usize;
208 }
209 extern "C" {
ZSTD_getFrameContentSize( src: *const ::core::ffi::c_void, srcSize: usize, ) -> ::std::os::raw::c_ulonglong210     pub fn ZSTD_getFrameContentSize(
211         src: *const ::core::ffi::c_void,
212         srcSize: usize,
213     ) -> ::std::os::raw::c_ulonglong;
214 }
215 extern "C" {
216     #[doc = " ZSTD_getDecompressedSize() :"]
217     #[doc = "  NOTE: This function is now obsolete, in favor of ZSTD_getFrameContentSize()."]
218     #[doc = "  Both functions work the same way, but ZSTD_getDecompressedSize() blends"]
219     #[doc = "  \"empty\", \"unknown\" and \"error\" results to the same return value (0),"]
220     #[doc = "  while ZSTD_getFrameContentSize() gives them separate return values."]
221     #[doc = " @return : decompressed size of `src` frame content _if known and not empty_, 0 otherwise."]
ZSTD_getDecompressedSize( src: *const ::core::ffi::c_void, srcSize: usize, ) -> ::std::os::raw::c_ulonglong222     pub fn ZSTD_getDecompressedSize(
223         src: *const ::core::ffi::c_void,
224         srcSize: usize,
225     ) -> ::std::os::raw::c_ulonglong;
226 }
227 extern "C" {
228     #[doc = " ZSTD_findFrameCompressedSize() :"]
229     #[doc = " `src` should point to the start of a ZSTD frame or skippable frame."]
230     #[doc = " `srcSize` must be >= first frame size"]
231     #[doc = " @return : the compressed size of the first frame starting at `src`,"]
232     #[doc = "           suitable to pass as `srcSize` to `ZSTD_decompress` or similar,"]
233     #[doc = "        or an error code if input is invalid"]
ZSTD_findFrameCompressedSize( src: *const ::core::ffi::c_void, srcSize: usize, ) -> usize234     pub fn ZSTD_findFrameCompressedSize(
235         src: *const ::core::ffi::c_void,
236         srcSize: usize,
237     ) -> usize;
238 }
239 extern "C" {
ZSTD_compressBound(srcSize: usize) -> usize240     pub fn ZSTD_compressBound(srcSize: usize) -> usize;
241 }
242 extern "C" {
ZSTD_isError(code: usize) -> ::std::os::raw::c_uint243     pub fn ZSTD_isError(code: usize) -> ::std::os::raw::c_uint;
244 }
245 extern "C" {
ZSTD_getErrorName(code: usize) -> *const ::std::os::raw::c_char246     pub fn ZSTD_getErrorName(code: usize) -> *const ::std::os::raw::c_char;
247 }
248 extern "C" {
ZSTD_minCLevel() -> ::std::os::raw::c_int249     pub fn ZSTD_minCLevel() -> ::std::os::raw::c_int;
250 }
251 extern "C" {
ZSTD_maxCLevel() -> ::std::os::raw::c_int252     pub fn ZSTD_maxCLevel() -> ::std::os::raw::c_int;
253 }
254 #[repr(C)]
255 #[derive(Debug, Copy, Clone)]
256 pub struct ZSTD_CCtx_s {
257     _unused: [u8; 0],
258 }
259 #[doc = "  Explicit context"]
260 pub type ZSTD_CCtx = ZSTD_CCtx_s;
261 extern "C" {
ZSTD_createCCtx() -> *mut ZSTD_CCtx262     pub fn ZSTD_createCCtx() -> *mut ZSTD_CCtx;
263 }
264 extern "C" {
ZSTD_freeCCtx(cctx: *mut ZSTD_CCtx) -> usize265     pub fn ZSTD_freeCCtx(cctx: *mut ZSTD_CCtx) -> usize;
266 }
267 extern "C" {
268     #[doc = " ZSTD_compressCCtx() :"]
269     #[doc = "  Same as ZSTD_compress(), using an explicit ZSTD_CCtx."]
270     #[doc = "  Important : in order to behave similarly to `ZSTD_compress()`,"]
271     #[doc = "  this function compresses at requested compression level,"]
272     #[doc = "  __ignoring any other parameter__ ."]
273     #[doc = "  If any advanced parameter was set using the advanced API,"]
274     #[doc = "  they will all be reset. Only `compressionLevel` remains."]
ZSTD_compressCCtx( cctx: *mut ZSTD_CCtx, dst: *mut ::core::ffi::c_void, dstCapacity: usize, src: *const ::core::ffi::c_void, srcSize: usize, compressionLevel: ::std::os::raw::c_int, ) -> usize275     pub fn ZSTD_compressCCtx(
276         cctx: *mut ZSTD_CCtx,
277         dst: *mut ::core::ffi::c_void,
278         dstCapacity: usize,
279         src: *const ::core::ffi::c_void,
280         srcSize: usize,
281         compressionLevel: ::std::os::raw::c_int,
282     ) -> usize;
283 }
284 #[repr(C)]
285 #[derive(Debug, Copy, Clone)]
286 pub struct ZSTD_DCtx_s {
287     _unused: [u8; 0],
288 }
289 pub type ZSTD_DCtx = ZSTD_DCtx_s;
290 extern "C" {
ZSTD_createDCtx() -> *mut ZSTD_DCtx291     pub fn ZSTD_createDCtx() -> *mut ZSTD_DCtx;
292 }
293 extern "C" {
ZSTD_freeDCtx(dctx: *mut ZSTD_DCtx) -> usize294     pub fn ZSTD_freeDCtx(dctx: *mut ZSTD_DCtx) -> usize;
295 }
296 extern "C" {
297     #[doc = " ZSTD_decompressDCtx() :"]
298     #[doc = "  Same as ZSTD_decompress(),"]
299     #[doc = "  requires an allocated ZSTD_DCtx."]
300     #[doc = "  Compatible with sticky parameters."]
ZSTD_decompressDCtx( dctx: *mut ZSTD_DCtx, dst: *mut ::core::ffi::c_void, dstCapacity: usize, src: *const ::core::ffi::c_void, srcSize: usize, ) -> usize301     pub fn ZSTD_decompressDCtx(
302         dctx: *mut ZSTD_DCtx,
303         dst: *mut ::core::ffi::c_void,
304         dstCapacity: usize,
305         src: *const ::core::ffi::c_void,
306         srcSize: usize,
307     ) -> usize;
308 }
309 #[repr(u32)]
310 #[doc = "  Advanced compression API"]
311 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
312 pub enum ZSTD_strategy {
313     ZSTD_fast = 1,
314     ZSTD_dfast = 2,
315     ZSTD_greedy = 3,
316     ZSTD_lazy = 4,
317     ZSTD_lazy2 = 5,
318     ZSTD_btlazy2 = 6,
319     ZSTD_btopt = 7,
320     ZSTD_btultra = 8,
321     ZSTD_btultra2 = 9,
322 }
323 #[repr(u32)]
324 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
325 pub enum ZSTD_cParameter {
326     ZSTD_c_compressionLevel = 100,
327     ZSTD_c_windowLog = 101,
328     ZSTD_c_hashLog = 102,
329     ZSTD_c_chainLog = 103,
330     ZSTD_c_searchLog = 104,
331     ZSTD_c_minMatch = 105,
332     ZSTD_c_targetLength = 106,
333     ZSTD_c_strategy = 107,
334     ZSTD_c_enableLongDistanceMatching = 160,
335     ZSTD_c_ldmHashLog = 161,
336     ZSTD_c_ldmMinMatch = 162,
337     ZSTD_c_ldmBucketSizeLog = 163,
338     ZSTD_c_ldmHashRateLog = 164,
339     ZSTD_c_contentSizeFlag = 200,
340     ZSTD_c_checksumFlag = 201,
341     ZSTD_c_dictIDFlag = 202,
342     ZSTD_c_nbWorkers = 400,
343     ZSTD_c_jobSize = 401,
344     ZSTD_c_overlapLog = 402,
345     ZSTD_c_experimentalParam1 = 500,
346     ZSTD_c_experimentalParam2 = 10,
347     ZSTD_c_experimentalParam3 = 1000,
348     ZSTD_c_experimentalParam4 = 1001,
349     ZSTD_c_experimentalParam5 = 1002,
350     ZSTD_c_experimentalParam6 = 1003,
351     ZSTD_c_experimentalParam7 = 1004,
352     ZSTD_c_experimentalParam8 = 1005,
353     ZSTD_c_experimentalParam9 = 1006,
354     ZSTD_c_experimentalParam10 = 1007,
355     ZSTD_c_experimentalParam11 = 1008,
356     ZSTD_c_experimentalParam12 = 1009,
357 }
358 #[repr(C)]
359 #[derive(Debug, Copy, Clone)]
360 pub struct ZSTD_bounds {
361     pub error: usize,
362     pub lowerBound: ::std::os::raw::c_int,
363     pub upperBound: ::std::os::raw::c_int,
364 }
365 #[test]
bindgen_test_layout_ZSTD_bounds()366 fn bindgen_test_layout_ZSTD_bounds() {
367     assert_eq!(
368         ::core::mem::size_of::<ZSTD_bounds>(),
369         16usize,
370         concat!("Size of: ", stringify!(ZSTD_bounds))
371     );
372     assert_eq!(
373         ::core::mem::align_of::<ZSTD_bounds>(),
374         8usize,
375         concat!("Alignment of ", stringify!(ZSTD_bounds))
376     );
377     assert_eq!(
378         unsafe {
379             &(*(::core::ptr::null::<ZSTD_bounds>())).error as *const _ as usize
380         },
381         0usize,
382         concat!(
383             "Offset of field: ",
384             stringify!(ZSTD_bounds),
385             "::",
386             stringify!(error)
387         )
388     );
389     assert_eq!(
390         unsafe {
391             &(*(::core::ptr::null::<ZSTD_bounds>())).lowerBound as *const _
392                 as usize
393         },
394         8usize,
395         concat!(
396             "Offset of field: ",
397             stringify!(ZSTD_bounds),
398             "::",
399             stringify!(lowerBound)
400         )
401     );
402     assert_eq!(
403         unsafe {
404             &(*(::core::ptr::null::<ZSTD_bounds>())).upperBound as *const _
405                 as usize
406         },
407         12usize,
408         concat!(
409             "Offset of field: ",
410             stringify!(ZSTD_bounds),
411             "::",
412             stringify!(upperBound)
413         )
414     );
415 }
416 extern "C" {
417     #[doc = " ZSTD_cParam_getBounds() :"]
418     #[doc = "  All parameters must belong to an interval with lower and upper bounds,"]
419     #[doc = "  otherwise they will either trigger an error or be automatically clamped."]
420     #[doc = " @return : a structure, ZSTD_bounds, which contains"]
421     #[doc = "         - an error status field, which must be tested using ZSTD_isError()"]
422     #[doc = "         - lower and upper bounds, both inclusive"]
ZSTD_cParam_getBounds(cParam: ZSTD_cParameter) -> ZSTD_bounds423     pub fn ZSTD_cParam_getBounds(cParam: ZSTD_cParameter) -> ZSTD_bounds;
424 }
425 extern "C" {
426     #[doc = " ZSTD_CCtx_setParameter() :"]
427     #[doc = "  Set one compression parameter, selected by enum ZSTD_cParameter."]
428     #[doc = "  All parameters have valid bounds. Bounds can be queried using ZSTD_cParam_getBounds()."]
429     #[doc = "  Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter)."]
430     #[doc = "  Setting a parameter is generally only possible during frame initialization (before starting compression)."]
431     #[doc = "  Exception : when using multi-threading mode (nbWorkers >= 1),"]
432     #[doc = "              the following parameters can be updated _during_ compression (within same frame):"]
433     #[doc = "              => compressionLevel, hashLog, chainLog, searchLog, minMatch, targetLength and strategy."]
434     #[doc = "              new parameters will be active for next job only (after a flush())."]
435     #[doc = " @return : an error code (which can be tested using ZSTD_isError())."]
ZSTD_CCtx_setParameter( cctx: *mut ZSTD_CCtx, param: ZSTD_cParameter, value: ::std::os::raw::c_int, ) -> usize436     pub fn ZSTD_CCtx_setParameter(
437         cctx: *mut ZSTD_CCtx,
438         param: ZSTD_cParameter,
439         value: ::std::os::raw::c_int,
440     ) -> usize;
441 }
442 extern "C" {
443     #[doc = " ZSTD_CCtx_setPledgedSrcSize() :"]
444     #[doc = "  Total input data size to be compressed as a single frame."]
445     #[doc = "  Value will be written in frame header, unless if explicitly forbidden using ZSTD_c_contentSizeFlag."]
446     #[doc = "  This value will also be controlled at end of frame, and trigger an error if not respected."]
447     #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
448     #[doc = "  Note 1 : pledgedSrcSize==0 actually means zero, aka an empty frame."]
449     #[doc = "           In order to mean \"unknown content size\", pass constant ZSTD_CONTENTSIZE_UNKNOWN."]
450     #[doc = "           ZSTD_CONTENTSIZE_UNKNOWN is default value for any new frame."]
451     #[doc = "  Note 2 : pledgedSrcSize is only valid once, for the next frame."]
452     #[doc = "           It's discarded at the end of the frame, and replaced by ZSTD_CONTENTSIZE_UNKNOWN."]
453     #[doc = "  Note 3 : Whenever all input data is provided and consumed in a single round,"]
454     #[doc = "           for example with ZSTD_compress2(),"]
455     #[doc = "           or invoking immediately ZSTD_compressStream2(,,,ZSTD_e_end),"]
456     #[doc = "           this value is automatically overridden by srcSize instead."]
ZSTD_CCtx_setPledgedSrcSize( cctx: *mut ZSTD_CCtx, pledgedSrcSize: ::std::os::raw::c_ulonglong, ) -> usize457     pub fn ZSTD_CCtx_setPledgedSrcSize(
458         cctx: *mut ZSTD_CCtx,
459         pledgedSrcSize: ::std::os::raw::c_ulonglong,
460     ) -> usize;
461 }
462 #[repr(u32)]
463 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
464 pub enum ZSTD_ResetDirective {
465     ZSTD_reset_session_only = 1,
466     ZSTD_reset_parameters = 2,
467     ZSTD_reset_session_and_parameters = 3,
468 }
469 extern "C" {
470     #[doc = " ZSTD_CCtx_reset() :"]
471     #[doc = "  There are 2 different things that can be reset, independently or jointly :"]
472     #[doc = "  - The session : will stop compressing current frame, and make CCtx ready to start a new one."]
473     #[doc = "                  Useful after an error, or to interrupt any ongoing compression."]
474     #[doc = "                  Any internal data not yet flushed is cancelled."]
475     #[doc = "                  Compression parameters and dictionary remain unchanged."]
476     #[doc = "                  They will be used to compress next frame."]
477     #[doc = "                  Resetting session never fails."]
478     #[doc = "  - The parameters : changes all parameters back to \"default\"."]
479     #[doc = "                  This removes any reference to any dictionary too."]
480     #[doc = "                  Parameters can only be changed between 2 sessions (i.e. no compression is currently ongoing)"]
481     #[doc = "                  otherwise the reset fails, and function returns an error value (which can be tested using ZSTD_isError())"]
482     #[doc = "  - Both : similar to resetting the session, followed by resetting parameters."]
ZSTD_CCtx_reset( cctx: *mut ZSTD_CCtx, reset: ZSTD_ResetDirective, ) -> usize483     pub fn ZSTD_CCtx_reset(
484         cctx: *mut ZSTD_CCtx,
485         reset: ZSTD_ResetDirective,
486     ) -> usize;
487 }
488 extern "C" {
489     #[doc = " ZSTD_compress2() :"]
490     #[doc = "  Behave the same as ZSTD_compressCCtx(), but compression parameters are set using the advanced API."]
491     #[doc = "  ZSTD_compress2() always starts a new frame."]
492     #[doc = "  Should cctx hold data from a previously unfinished frame, everything about it is forgotten."]
493     #[doc = "  - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*()"]
494     #[doc = "  - The function is always blocking, returns when compression is completed."]
495     #[doc = "  Hint : compression runs faster if `dstCapacity` >=  `ZSTD_compressBound(srcSize)`."]
496     #[doc = " @return : compressed size written into `dst` (<= `dstCapacity),"]
497     #[doc = "           or an error code if it fails (which can be tested using ZSTD_isError())."]
ZSTD_compress2( cctx: *mut ZSTD_CCtx, dst: *mut ::core::ffi::c_void, dstCapacity: usize, src: *const ::core::ffi::c_void, srcSize: usize, ) -> usize498     pub fn ZSTD_compress2(
499         cctx: *mut ZSTD_CCtx,
500         dst: *mut ::core::ffi::c_void,
501         dstCapacity: usize,
502         src: *const ::core::ffi::c_void,
503         srcSize: usize,
504     ) -> usize;
505 }
506 #[repr(u32)]
507 #[doc = "  Advanced decompression API"]
508 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
509 pub enum ZSTD_dParameter {
510     ZSTD_d_windowLogMax = 100,
511     ZSTD_d_experimentalParam1 = 1000,
512     ZSTD_d_experimentalParam2 = 1001,
513     ZSTD_d_experimentalParam3 = 1002,
514 }
515 extern "C" {
516     #[doc = " ZSTD_dParam_getBounds() :"]
517     #[doc = "  All parameters must belong to an interval with lower and upper bounds,"]
518     #[doc = "  otherwise they will either trigger an error or be automatically clamped."]
519     #[doc = " @return : a structure, ZSTD_bounds, which contains"]
520     #[doc = "         - an error status field, which must be tested using ZSTD_isError()"]
521     #[doc = "         - both lower and upper bounds, inclusive"]
ZSTD_dParam_getBounds(dParam: ZSTD_dParameter) -> ZSTD_bounds522     pub fn ZSTD_dParam_getBounds(dParam: ZSTD_dParameter) -> ZSTD_bounds;
523 }
524 extern "C" {
525     #[doc = " ZSTD_DCtx_setParameter() :"]
526     #[doc = "  Set one compression parameter, selected by enum ZSTD_dParameter."]
527     #[doc = "  All parameters have valid bounds. Bounds can be queried using ZSTD_dParam_getBounds()."]
528     #[doc = "  Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter)."]
529     #[doc = "  Setting a parameter is only possible during frame initialization (before starting decompression)."]
530     #[doc = " @return : 0, or an error code (which can be tested using ZSTD_isError())."]
ZSTD_DCtx_setParameter( dctx: *mut ZSTD_DCtx, param: ZSTD_dParameter, value: ::std::os::raw::c_int, ) -> usize531     pub fn ZSTD_DCtx_setParameter(
532         dctx: *mut ZSTD_DCtx,
533         param: ZSTD_dParameter,
534         value: ::std::os::raw::c_int,
535     ) -> usize;
536 }
537 extern "C" {
538     #[doc = " ZSTD_DCtx_reset() :"]
539     #[doc = "  Return a DCtx to clean state."]
540     #[doc = "  Session and parameters can be reset jointly or separately."]
541     #[doc = "  Parameters can only be reset when no active frame is being decompressed."]
542     #[doc = " @return : 0, or an error code, which can be tested with ZSTD_isError()"]
ZSTD_DCtx_reset( dctx: *mut ZSTD_DCtx, reset: ZSTD_ResetDirective, ) -> usize543     pub fn ZSTD_DCtx_reset(
544         dctx: *mut ZSTD_DCtx,
545         reset: ZSTD_ResetDirective,
546     ) -> usize;
547 }
548 #[doc = "  Streaming"]
549 #[repr(C)]
550 #[derive(Debug, Copy, Clone)]
551 pub struct ZSTD_inBuffer_s {
552     #[doc = "< start of input buffer"]
553     pub src: *const ::core::ffi::c_void,
554     #[doc = "< size of input buffer"]
555     pub size: usize,
556     #[doc = "< position where reading stopped. Will be updated. Necessarily 0 <= pos <= size"]
557     pub pos: usize,
558 }
559 #[test]
bindgen_test_layout_ZSTD_inBuffer_s()560 fn bindgen_test_layout_ZSTD_inBuffer_s() {
561     assert_eq!(
562         ::core::mem::size_of::<ZSTD_inBuffer_s>(),
563         24usize,
564         concat!("Size of: ", stringify!(ZSTD_inBuffer_s))
565     );
566     assert_eq!(
567         ::core::mem::align_of::<ZSTD_inBuffer_s>(),
568         8usize,
569         concat!("Alignment of ", stringify!(ZSTD_inBuffer_s))
570     );
571     assert_eq!(
572         unsafe {
573             &(*(::core::ptr::null::<ZSTD_inBuffer_s>())).src as *const _
574                 as usize
575         },
576         0usize,
577         concat!(
578             "Offset of field: ",
579             stringify!(ZSTD_inBuffer_s),
580             "::",
581             stringify!(src)
582         )
583     );
584     assert_eq!(
585         unsafe {
586             &(*(::core::ptr::null::<ZSTD_inBuffer_s>())).size as *const _
587                 as usize
588         },
589         8usize,
590         concat!(
591             "Offset of field: ",
592             stringify!(ZSTD_inBuffer_s),
593             "::",
594             stringify!(size)
595         )
596     );
597     assert_eq!(
598         unsafe {
599             &(*(::core::ptr::null::<ZSTD_inBuffer_s>())).pos as *const _
600                 as usize
601         },
602         16usize,
603         concat!(
604             "Offset of field: ",
605             stringify!(ZSTD_inBuffer_s),
606             "::",
607             stringify!(pos)
608         )
609     );
610 }
611 #[doc = "  Streaming"]
612 pub type ZSTD_inBuffer = ZSTD_inBuffer_s;
613 #[repr(C)]
614 #[derive(Debug, Copy, Clone)]
615 pub struct ZSTD_outBuffer_s {
616     #[doc = "< start of output buffer"]
617     pub dst: *mut ::core::ffi::c_void,
618     #[doc = "< size of output buffer"]
619     pub size: usize,
620     #[doc = "< position where writing stopped. Will be updated. Necessarily 0 <= pos <= size"]
621     pub pos: usize,
622 }
623 #[test]
bindgen_test_layout_ZSTD_outBuffer_s()624 fn bindgen_test_layout_ZSTD_outBuffer_s() {
625     assert_eq!(
626         ::core::mem::size_of::<ZSTD_outBuffer_s>(),
627         24usize,
628         concat!("Size of: ", stringify!(ZSTD_outBuffer_s))
629     );
630     assert_eq!(
631         ::core::mem::align_of::<ZSTD_outBuffer_s>(),
632         8usize,
633         concat!("Alignment of ", stringify!(ZSTD_outBuffer_s))
634     );
635     assert_eq!(
636         unsafe {
637             &(*(::core::ptr::null::<ZSTD_outBuffer_s>())).dst as *const _
638                 as usize
639         },
640         0usize,
641         concat!(
642             "Offset of field: ",
643             stringify!(ZSTD_outBuffer_s),
644             "::",
645             stringify!(dst)
646         )
647     );
648     assert_eq!(
649         unsafe {
650             &(*(::core::ptr::null::<ZSTD_outBuffer_s>())).size as *const _
651                 as usize
652         },
653         8usize,
654         concat!(
655             "Offset of field: ",
656             stringify!(ZSTD_outBuffer_s),
657             "::",
658             stringify!(size)
659         )
660     );
661     assert_eq!(
662         unsafe {
663             &(*(::core::ptr::null::<ZSTD_outBuffer_s>())).pos as *const _
664                 as usize
665         },
666         16usize,
667         concat!(
668             "Offset of field: ",
669             stringify!(ZSTD_outBuffer_s),
670             "::",
671             stringify!(pos)
672         )
673     );
674 }
675 pub type ZSTD_outBuffer = ZSTD_outBuffer_s;
676 pub type ZSTD_CStream = ZSTD_CCtx;
677 extern "C" {
ZSTD_createCStream() -> *mut ZSTD_CStream678     pub fn ZSTD_createCStream() -> *mut ZSTD_CStream;
679 }
680 extern "C" {
ZSTD_freeCStream(zcs: *mut ZSTD_CStream) -> usize681     pub fn ZSTD_freeCStream(zcs: *mut ZSTD_CStream) -> usize;
682 }
683 #[repr(u32)]
684 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
685 pub enum ZSTD_EndDirective {
686     ZSTD_e_continue = 0,
687     ZSTD_e_flush = 1,
688     ZSTD_e_end = 2,
689 }
690 extern "C" {
691     #[doc = " ZSTD_compressStream2() :"]
692     #[doc = "  Behaves about the same as ZSTD_compressStream, with additional control on end directive."]
693     #[doc = "  - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*()"]
694     #[doc = "  - Compression parameters cannot be changed once compression is started (save a list of exceptions in multi-threading mode)"]
695     #[doc = "  - output->pos must be <= dstCapacity, input->pos must be <= srcSize"]
696     #[doc = "  - output->pos and input->pos will be updated. They are guaranteed to remain below their respective limit."]
697     #[doc = "  - endOp must be a valid directive"]
698     #[doc = "  - When nbWorkers==0 (default), function is blocking : it completes its job before returning to caller."]
699     #[doc = "  - When nbWorkers>=1, function is non-blocking : it copies a portion of input, distributes jobs to internal worker threads, flush to output whatever is available,"]
700     #[doc = "                                                  and then immediately returns, just indicating that there is some data remaining to be flushed."]
701     #[doc = "                                                  The function nonetheless guarantees forward progress : it will return only after it reads or write at least 1+ byte."]
702     #[doc = "  - Exception : if the first call requests a ZSTD_e_end directive and provides enough dstCapacity, the function delegates to ZSTD_compress2() which is always blocking."]
703     #[doc = "  - @return provides a minimum amount of data remaining to be flushed from internal buffers"]
704     #[doc = "            or an error code, which can be tested using ZSTD_isError()."]
705     #[doc = "            if @return != 0, flush is not fully completed, there is still some data left within internal buffers."]
706     #[doc = "            This is useful for ZSTD_e_flush, since in this case more flushes are necessary to empty all buffers."]
707     #[doc = "            For ZSTD_e_end, @return == 0 when internal buffers are fully flushed and frame is completed."]
708     #[doc = "  - after a ZSTD_e_end directive, if internal buffer is not fully flushed (@return != 0),"]
709     #[doc = "            only ZSTD_e_end or ZSTD_e_flush operations are allowed."]
710     #[doc = "            Before starting a new compression job, or changing compression parameters,"]
711     #[doc = "            it is required to fully flush internal buffers."]
ZSTD_compressStream2( cctx: *mut ZSTD_CCtx, output: *mut ZSTD_outBuffer, input: *mut ZSTD_inBuffer, endOp: ZSTD_EndDirective, ) -> usize712     pub fn ZSTD_compressStream2(
713         cctx: *mut ZSTD_CCtx,
714         output: *mut ZSTD_outBuffer,
715         input: *mut ZSTD_inBuffer,
716         endOp: ZSTD_EndDirective,
717     ) -> usize;
718 }
719 extern "C" {
ZSTD_CStreamInSize() -> usize720     pub fn ZSTD_CStreamInSize() -> usize;
721 }
722 extern "C" {
ZSTD_CStreamOutSize() -> usize723     pub fn ZSTD_CStreamOutSize() -> usize;
724 }
725 extern "C" {
726     #[doc = " Equivalent to:"]
727     #[doc = ""]
728     #[doc = "     ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only);"]
729     #[doc = "     ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any)"]
730     #[doc = "     ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel);"]
ZSTD_initCStream( zcs: *mut ZSTD_CStream, compressionLevel: ::std::os::raw::c_int, ) -> usize731     pub fn ZSTD_initCStream(
732         zcs: *mut ZSTD_CStream,
733         compressionLevel: ::std::os::raw::c_int,
734     ) -> usize;
735 }
736 extern "C" {
737     #[doc = " Alternative for ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue)."]
738     #[doc = " NOTE: The return value is different. ZSTD_compressStream() returns a hint for"]
739     #[doc = " the next read size (if non-zero and not an error). ZSTD_compressStream2()"]
740     #[doc = " returns the minimum nb of bytes left to flush (if non-zero and not an error)."]
ZSTD_compressStream( zcs: *mut ZSTD_CStream, output: *mut ZSTD_outBuffer, input: *mut ZSTD_inBuffer, ) -> usize741     pub fn ZSTD_compressStream(
742         zcs: *mut ZSTD_CStream,
743         output: *mut ZSTD_outBuffer,
744         input: *mut ZSTD_inBuffer,
745     ) -> usize;
746 }
747 extern "C" {
748     #[doc = " Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_flush)."]
ZSTD_flushStream( zcs: *mut ZSTD_CStream, output: *mut ZSTD_outBuffer, ) -> usize749     pub fn ZSTD_flushStream(
750         zcs: *mut ZSTD_CStream,
751         output: *mut ZSTD_outBuffer,
752     ) -> usize;
753 }
754 extern "C" {
755     #[doc = " Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_end)."]
ZSTD_endStream( zcs: *mut ZSTD_CStream, output: *mut ZSTD_outBuffer, ) -> usize756     pub fn ZSTD_endStream(
757         zcs: *mut ZSTD_CStream,
758         output: *mut ZSTD_outBuffer,
759     ) -> usize;
760 }
761 pub type ZSTD_DStream = ZSTD_DCtx;
762 extern "C" {
ZSTD_createDStream() -> *mut ZSTD_DStream763     pub fn ZSTD_createDStream() -> *mut ZSTD_DStream;
764 }
765 extern "C" {
ZSTD_freeDStream(zds: *mut ZSTD_DStream) -> usize766     pub fn ZSTD_freeDStream(zds: *mut ZSTD_DStream) -> usize;
767 }
768 extern "C" {
ZSTD_initDStream(zds: *mut ZSTD_DStream) -> usize769     pub fn ZSTD_initDStream(zds: *mut ZSTD_DStream) -> usize;
770 }
771 extern "C" {
ZSTD_decompressStream( zds: *mut ZSTD_DStream, output: *mut ZSTD_outBuffer, input: *mut ZSTD_inBuffer, ) -> usize772     pub fn ZSTD_decompressStream(
773         zds: *mut ZSTD_DStream,
774         output: *mut ZSTD_outBuffer,
775         input: *mut ZSTD_inBuffer,
776     ) -> usize;
777 }
778 extern "C" {
ZSTD_DStreamInSize() -> usize779     pub fn ZSTD_DStreamInSize() -> usize;
780 }
781 extern "C" {
ZSTD_DStreamOutSize() -> usize782     pub fn ZSTD_DStreamOutSize() -> usize;
783 }
784 extern "C" {
785     #[doc = "  Simple dictionary API"]
786     #[doc = "  Compression at an explicit compression level using a Dictionary."]
787     #[doc = "  A dictionary can be any arbitrary data segment (also called a prefix),"]
788     #[doc = "  or a buffer with specified information (see dictBuilder/zdict.h)."]
789     #[doc = "  Note : This function loads the dictionary, resulting in significant startup delay."]
790     #[doc = "         It's intended for a dictionary used only once."]
791     #[doc = "  Note 2 : When `dict == NULL || dictSize < 8` no dictionary is used."]
ZSTD_compress_usingDict( ctx: *mut ZSTD_CCtx, dst: *mut ::core::ffi::c_void, dstCapacity: usize, src: *const ::core::ffi::c_void, srcSize: usize, dict: *const ::core::ffi::c_void, dictSize: usize, compressionLevel: ::std::os::raw::c_int, ) -> usize792     pub fn ZSTD_compress_usingDict(
793         ctx: *mut ZSTD_CCtx,
794         dst: *mut ::core::ffi::c_void,
795         dstCapacity: usize,
796         src: *const ::core::ffi::c_void,
797         srcSize: usize,
798         dict: *const ::core::ffi::c_void,
799         dictSize: usize,
800         compressionLevel: ::std::os::raw::c_int,
801     ) -> usize;
802 }
803 extern "C" {
804     #[doc = " ZSTD_decompress_usingDict() :"]
805     #[doc = "  Decompression using a known Dictionary."]
806     #[doc = "  Dictionary must be identical to the one used during compression."]
807     #[doc = "  Note : This function loads the dictionary, resulting in significant startup delay."]
808     #[doc = "         It's intended for a dictionary used only once."]
809     #[doc = "  Note : When `dict == NULL || dictSize < 8` no dictionary is used."]
ZSTD_decompress_usingDict( dctx: *mut ZSTD_DCtx, dst: *mut ::core::ffi::c_void, dstCapacity: usize, src: *const ::core::ffi::c_void, srcSize: usize, dict: *const ::core::ffi::c_void, dictSize: usize, ) -> usize810     pub fn ZSTD_decompress_usingDict(
811         dctx: *mut ZSTD_DCtx,
812         dst: *mut ::core::ffi::c_void,
813         dstCapacity: usize,
814         src: *const ::core::ffi::c_void,
815         srcSize: usize,
816         dict: *const ::core::ffi::c_void,
817         dictSize: usize,
818     ) -> usize;
819 }
820 #[repr(C)]
821 #[derive(Debug, Copy, Clone)]
822 pub struct ZSTD_CDict_s {
823     _unused: [u8; 0],
824 }
825 #[doc = "  Bulk processing dictionary API"]
826 pub type ZSTD_CDict = ZSTD_CDict_s;
827 extern "C" {
828     #[doc = " ZSTD_createCDict() :"]
829     #[doc = "  When compressing multiple messages or blocks using the same dictionary,"]
830     #[doc = "  it's recommended to digest the dictionary only once, since it's a costly operation."]
831     #[doc = "  ZSTD_createCDict() will create a state from digesting a dictionary."]
832     #[doc = "  The resulting state can be used for future compression operations with very limited startup cost."]
833     #[doc = "  ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only."]
834     #[doc = " @dictBuffer can be released after ZSTD_CDict creation, because its content is copied within CDict."]
835     #[doc = "  Note 1 : Consider experimental function `ZSTD_createCDict_byReference()` if you prefer to not duplicate @dictBuffer content."]
836     #[doc = "  Note 2 : A ZSTD_CDict can be created from an empty @dictBuffer,"]
837     #[doc = "      in which case the only thing that it transports is the @compressionLevel."]
838     #[doc = "      This can be useful in a pipeline featuring ZSTD_compress_usingCDict() exclusively,"]
839     #[doc = "      expecting a ZSTD_CDict parameter with any data, including those without a known dictionary."]
ZSTD_createCDict( dictBuffer: *const ::core::ffi::c_void, dictSize: usize, compressionLevel: ::std::os::raw::c_int, ) -> *mut ZSTD_CDict840     pub fn ZSTD_createCDict(
841         dictBuffer: *const ::core::ffi::c_void,
842         dictSize: usize,
843         compressionLevel: ::std::os::raw::c_int,
844     ) -> *mut ZSTD_CDict;
845 }
846 extern "C" {
847     #[doc = " ZSTD_freeCDict() :"]
848     #[doc = "  Function frees memory allocated by ZSTD_createCDict()."]
ZSTD_freeCDict(CDict: *mut ZSTD_CDict) -> usize849     pub fn ZSTD_freeCDict(CDict: *mut ZSTD_CDict) -> usize;
850 }
851 extern "C" {
852     #[doc = " ZSTD_compress_usingCDict() :"]
853     #[doc = "  Compression using a digested Dictionary."]
854     #[doc = "  Recommended when same dictionary is used multiple times."]
855     #[doc = "  Note : compression level is _decided at dictionary creation time_,"]
856     #[doc = "     and frame parameters are hardcoded (dictID=yes, contentSize=yes, checksum=no)"]
ZSTD_compress_usingCDict( cctx: *mut ZSTD_CCtx, dst: *mut ::core::ffi::c_void, dstCapacity: usize, src: *const ::core::ffi::c_void, srcSize: usize, cdict: *const ZSTD_CDict, ) -> usize857     pub fn ZSTD_compress_usingCDict(
858         cctx: *mut ZSTD_CCtx,
859         dst: *mut ::core::ffi::c_void,
860         dstCapacity: usize,
861         src: *const ::core::ffi::c_void,
862         srcSize: usize,
863         cdict: *const ZSTD_CDict,
864     ) -> usize;
865 }
866 #[repr(C)]
867 #[derive(Debug, Copy, Clone)]
868 pub struct ZSTD_DDict_s {
869     _unused: [u8; 0],
870 }
871 pub type ZSTD_DDict = ZSTD_DDict_s;
872 extern "C" {
873     #[doc = " ZSTD_createDDict() :"]
874     #[doc = "  Create a digested dictionary, ready to start decompression operation without startup delay."]
875     #[doc = "  dictBuffer can be released after DDict creation, as its content is copied inside DDict."]
ZSTD_createDDict( dictBuffer: *const ::core::ffi::c_void, dictSize: usize, ) -> *mut ZSTD_DDict876     pub fn ZSTD_createDDict(
877         dictBuffer: *const ::core::ffi::c_void,
878         dictSize: usize,
879     ) -> *mut ZSTD_DDict;
880 }
881 extern "C" {
882     #[doc = " ZSTD_freeDDict() :"]
883     #[doc = "  Function frees memory allocated with ZSTD_createDDict()"]
ZSTD_freeDDict(ddict: *mut ZSTD_DDict) -> usize884     pub fn ZSTD_freeDDict(ddict: *mut ZSTD_DDict) -> usize;
885 }
886 extern "C" {
887     #[doc = " ZSTD_decompress_usingDDict() :"]
888     #[doc = "  Decompression using a digested Dictionary."]
889     #[doc = "  Recommended when same dictionary is used multiple times."]
ZSTD_decompress_usingDDict( dctx: *mut ZSTD_DCtx, dst: *mut ::core::ffi::c_void, dstCapacity: usize, src: *const ::core::ffi::c_void, srcSize: usize, ddict: *const ZSTD_DDict, ) -> usize890     pub fn ZSTD_decompress_usingDDict(
891         dctx: *mut ZSTD_DCtx,
892         dst: *mut ::core::ffi::c_void,
893         dstCapacity: usize,
894         src: *const ::core::ffi::c_void,
895         srcSize: usize,
896         ddict: *const ZSTD_DDict,
897     ) -> usize;
898 }
899 extern "C" {
900     #[doc = " ZSTD_getDictID_fromDict() :"]
901     #[doc = "  Provides the dictID stored within dictionary."]
902     #[doc = "  if @return == 0, the dictionary is not conformant with Zstandard specification."]
903     #[doc = "  It can still be loaded, but as a content-only dictionary."]
ZSTD_getDictID_fromDict( dict: *const ::core::ffi::c_void, dictSize: usize, ) -> ::std::os::raw::c_uint904     pub fn ZSTD_getDictID_fromDict(
905         dict: *const ::core::ffi::c_void,
906         dictSize: usize,
907     ) -> ::std::os::raw::c_uint;
908 }
909 extern "C" {
910     #[doc = " ZSTD_getDictID_fromDDict() :"]
911     #[doc = "  Provides the dictID of the dictionary loaded into `ddict`."]
912     #[doc = "  If @return == 0, the dictionary is not conformant to Zstandard specification, or empty."]
913     #[doc = "  Non-conformant dictionaries can still be loaded, but as content-only dictionaries."]
ZSTD_getDictID_fromDDict( ddict: *const ZSTD_DDict, ) -> ::std::os::raw::c_uint914     pub fn ZSTD_getDictID_fromDDict(
915         ddict: *const ZSTD_DDict,
916     ) -> ::std::os::raw::c_uint;
917 }
918 extern "C" {
919     #[doc = " ZSTD_getDictID_fromFrame() :"]
920     #[doc = "  Provides the dictID required to decompressed the frame stored within `src`."]
921     #[doc = "  If @return == 0, the dictID could not be decoded."]
922     #[doc = "  This could for one of the following reasons :"]
923     #[doc = "  - The frame does not require a dictionary to be decoded (most common case)."]
924     #[doc = "  - The frame was built with dictID intentionally removed. Whatever dictionary is necessary is a hidden information."]
925     #[doc = "    Note : this use case also happens when using a non-conformant dictionary."]
926     #[doc = "  - `srcSize` is too small, and as a result, the frame header could not be decoded (only possible if `srcSize < ZSTD_FRAMEHEADERSIZE_MAX`)."]
927     #[doc = "  - This is not a Zstandard frame."]
928     #[doc = "  When identifying the exact failure cause, it's possible to use ZSTD_getFrameHeader(), which will provide a more precise error code."]
ZSTD_getDictID_fromFrame( src: *const ::core::ffi::c_void, srcSize: usize, ) -> ::std::os::raw::c_uint929     pub fn ZSTD_getDictID_fromFrame(
930         src: *const ::core::ffi::c_void,
931         srcSize: usize,
932     ) -> ::std::os::raw::c_uint;
933 }
934 extern "C" {
935     #[doc = " ZSTD_CCtx_loadDictionary() :"]
936     #[doc = "  Create an internal CDict from `dict` buffer."]
937     #[doc = "  Decompression will have to use same dictionary."]
938     #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
939     #[doc = "  Special: Loading a NULL (or 0-size) dictionary invalidates previous dictionary,"]
940     #[doc = "           meaning \"return to no-dictionary mode\"."]
941     #[doc = "  Note 1 : Dictionary is sticky, it will be used for all future compressed frames."]
942     #[doc = "           To return to \"no-dictionary\" situation, load a NULL dictionary (or reset parameters)."]
943     #[doc = "  Note 2 : Loading a dictionary involves building tables."]
944     #[doc = "           It's also a CPU consuming operation, with non-negligible impact on latency."]
945     #[doc = "           Tables are dependent on compression parameters, and for this reason,"]
946     #[doc = "           compression parameters can no longer be changed after loading a dictionary."]
947     #[doc = "  Note 3 :`dict` content will be copied internally."]
948     #[doc = "           Use experimental ZSTD_CCtx_loadDictionary_byReference() to reference content instead."]
949     #[doc = "           In such a case, dictionary buffer must outlive its users."]
950     #[doc = "  Note 4 : Use ZSTD_CCtx_loadDictionary_advanced()"]
951     #[doc = "           to precisely select how dictionary content must be interpreted."]
ZSTD_CCtx_loadDictionary( cctx: *mut ZSTD_CCtx, dict: *const ::core::ffi::c_void, dictSize: usize, ) -> usize952     pub fn ZSTD_CCtx_loadDictionary(
953         cctx: *mut ZSTD_CCtx,
954         dict: *const ::core::ffi::c_void,
955         dictSize: usize,
956     ) -> usize;
957 }
958 extern "C" {
959     #[doc = " ZSTD_CCtx_refCDict() :"]
960     #[doc = "  Reference a prepared dictionary, to be used for all next compressed frames."]
961     #[doc = "  Note that compression parameters are enforced from within CDict,"]
962     #[doc = "  and supersede any compression parameter previously set within CCtx."]
963     #[doc = "  The parameters ignored are labled as \"superseded-by-cdict\" in the ZSTD_cParameter enum docs."]
964     #[doc = "  The ignored parameters will be used again if the CCtx is returned to no-dictionary mode."]
965     #[doc = "  The dictionary will remain valid for future compressed frames using same CCtx."]
966     #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
967     #[doc = "  Special : Referencing a NULL CDict means \"return to no-dictionary mode\"."]
968     #[doc = "  Note 1 : Currently, only one dictionary can be managed."]
969     #[doc = "           Referencing a new dictionary effectively \"discards\" any previous one."]
970     #[doc = "  Note 2 : CDict is just referenced, its lifetime must outlive its usage within CCtx."]
ZSTD_CCtx_refCDict( cctx: *mut ZSTD_CCtx, cdict: *const ZSTD_CDict, ) -> usize971     pub fn ZSTD_CCtx_refCDict(
972         cctx: *mut ZSTD_CCtx,
973         cdict: *const ZSTD_CDict,
974     ) -> usize;
975 }
976 extern "C" {
977     #[doc = " ZSTD_CCtx_refPrefix() :"]
978     #[doc = "  Reference a prefix (single-usage dictionary) for next compressed frame."]
979     #[doc = "  A prefix is **only used once**. Tables are discarded at end of frame (ZSTD_e_end)."]
980     #[doc = "  Decompression will need same prefix to properly regenerate data."]
981     #[doc = "  Compressing with a prefix is similar in outcome as performing a diff and compressing it,"]
982     #[doc = "  but performs much faster, especially during decompression (compression speed is tunable with compression level)."]
983     #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
984     #[doc = "  Special: Adding any prefix (including NULL) invalidates any previous prefix or dictionary"]
985     #[doc = "  Note 1 : Prefix buffer is referenced. It **must** outlive compression."]
986     #[doc = "           Its content must remain unmodified during compression."]
987     #[doc = "  Note 2 : If the intention is to diff some large src data blob with some prior version of itself,"]
988     #[doc = "           ensure that the window size is large enough to contain the entire source."]
989     #[doc = "           See ZSTD_c_windowLog."]
990     #[doc = "  Note 3 : Referencing a prefix involves building tables, which are dependent on compression parameters."]
991     #[doc = "           It's a CPU consuming operation, with non-negligible impact on latency."]
992     #[doc = "           If there is a need to use the same prefix multiple times, consider loadDictionary instead."]
993     #[doc = "  Note 4 : By default, the prefix is interpreted as raw content (ZSTD_dct_rawContent)."]
994     #[doc = "           Use experimental ZSTD_CCtx_refPrefix_advanced() to alter dictionary interpretation."]
ZSTD_CCtx_refPrefix( cctx: *mut ZSTD_CCtx, prefix: *const ::core::ffi::c_void, prefixSize: usize, ) -> usize995     pub fn ZSTD_CCtx_refPrefix(
996         cctx: *mut ZSTD_CCtx,
997         prefix: *const ::core::ffi::c_void,
998         prefixSize: usize,
999     ) -> usize;
1000 }
1001 extern "C" {
1002     #[doc = " ZSTD_DCtx_loadDictionary() :"]
1003     #[doc = "  Create an internal DDict from dict buffer,"]
1004     #[doc = "  to be used to decompress next frames."]
1005     #[doc = "  The dictionary remains valid for all future frames, until explicitly invalidated."]
1006     #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
1007     #[doc = "  Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary,"]
1008     #[doc = "            meaning \"return to no-dictionary mode\"."]
1009     #[doc = "  Note 1 : Loading a dictionary involves building tables,"]
1010     #[doc = "           which has a non-negligible impact on CPU usage and latency."]
1011     #[doc = "           It's recommended to \"load once, use many times\", to amortize the cost"]
1012     #[doc = "  Note 2 :`dict` content will be copied internally, so `dict` can be released after loading."]
1013     #[doc = "           Use ZSTD_DCtx_loadDictionary_byReference() to reference dictionary content instead."]
1014     #[doc = "  Note 3 : Use ZSTD_DCtx_loadDictionary_advanced() to take control of"]
1015     #[doc = "           how dictionary content is loaded and interpreted."]
ZSTD_DCtx_loadDictionary( dctx: *mut ZSTD_DCtx, dict: *const ::core::ffi::c_void, dictSize: usize, ) -> usize1016     pub fn ZSTD_DCtx_loadDictionary(
1017         dctx: *mut ZSTD_DCtx,
1018         dict: *const ::core::ffi::c_void,
1019         dictSize: usize,
1020     ) -> usize;
1021 }
1022 extern "C" {
1023     #[doc = " ZSTD_DCtx_refDDict() :"]
1024     #[doc = "  Reference a prepared dictionary, to be used to decompress next frames."]
1025     #[doc = "  The dictionary remains active for decompression of future frames using same DCtx."]
1026     #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
1027     #[doc = "  Note 1 : Currently, only one dictionary can be managed."]
1028     #[doc = "           Referencing a new dictionary effectively \"discards\" any previous one."]
1029     #[doc = "  Special: referencing a NULL DDict means \"return to no-dictionary mode\"."]
1030     #[doc = "  Note 2 : DDict is just referenced, its lifetime must outlive its usage from DCtx."]
ZSTD_DCtx_refDDict( dctx: *mut ZSTD_DCtx, ddict: *const ZSTD_DDict, ) -> usize1031     pub fn ZSTD_DCtx_refDDict(
1032         dctx: *mut ZSTD_DCtx,
1033         ddict: *const ZSTD_DDict,
1034     ) -> usize;
1035 }
1036 extern "C" {
1037     #[doc = " ZSTD_DCtx_refPrefix() :"]
1038     #[doc = "  Reference a prefix (single-usage dictionary) to decompress next frame."]
1039     #[doc = "  This is the reverse operation of ZSTD_CCtx_refPrefix(),"]
1040     #[doc = "  and must use the same prefix as the one used during compression."]
1041     #[doc = "  Prefix is **only used once**. Reference is discarded at end of frame."]
1042     #[doc = "  End of frame is reached when ZSTD_decompressStream() returns 0."]
1043     #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
1044     #[doc = "  Note 1 : Adding any prefix (including NULL) invalidates any previously set prefix or dictionary"]
1045     #[doc = "  Note 2 : Prefix buffer is referenced. It **must** outlive decompression."]
1046     #[doc = "           Prefix buffer must remain unmodified up to the end of frame,"]
1047     #[doc = "           reached when ZSTD_decompressStream() returns 0."]
1048     #[doc = "  Note 3 : By default, the prefix is treated as raw content (ZSTD_dct_rawContent)."]
1049     #[doc = "           Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode (Experimental section)"]
1050     #[doc = "  Note 4 : Referencing a raw content prefix has almost no cpu nor memory cost."]
1051     #[doc = "           A full dictionary is more costly, as it requires building tables."]
ZSTD_DCtx_refPrefix( dctx: *mut ZSTD_DCtx, prefix: *const ::core::ffi::c_void, prefixSize: usize, ) -> usize1052     pub fn ZSTD_DCtx_refPrefix(
1053         dctx: *mut ZSTD_DCtx,
1054         prefix: *const ::core::ffi::c_void,
1055         prefixSize: usize,
1056     ) -> usize;
1057 }
1058 extern "C" {
1059     #[doc = " ZSTD_sizeof_*() :"]
1060     #[doc = "  These functions give the _current_ memory usage of selected object."]
1061     #[doc = "  Note that object memory usage can evolve (increase or decrease) over time."]
ZSTD_sizeof_CCtx(cctx: *const ZSTD_CCtx) -> usize1062     pub fn ZSTD_sizeof_CCtx(cctx: *const ZSTD_CCtx) -> usize;
1063 }
1064 extern "C" {
ZSTD_sizeof_DCtx(dctx: *const ZSTD_DCtx) -> usize1065     pub fn ZSTD_sizeof_DCtx(dctx: *const ZSTD_DCtx) -> usize;
1066 }
1067 extern "C" {
ZSTD_sizeof_CStream(zcs: *const ZSTD_CStream) -> usize1068     pub fn ZSTD_sizeof_CStream(zcs: *const ZSTD_CStream) -> usize;
1069 }
1070 extern "C" {
ZSTD_sizeof_DStream(zds: *const ZSTD_DStream) -> usize1071     pub fn ZSTD_sizeof_DStream(zds: *const ZSTD_DStream) -> usize;
1072 }
1073 extern "C" {
ZSTD_sizeof_CDict(cdict: *const ZSTD_CDict) -> usize1074     pub fn ZSTD_sizeof_CDict(cdict: *const ZSTD_CDict) -> usize;
1075 }
1076 extern "C" {
ZSTD_sizeof_DDict(ddict: *const ZSTD_DDict) -> usize1077     pub fn ZSTD_sizeof_DDict(ddict: *const ZSTD_DDict) -> usize;
1078 }
1079 extern "C" {
1080     #[doc = " ZDICT_trainFromBuffer():"]
1081     #[doc = "  Train a dictionary from an array of samples."]
1082     #[doc = "  Redirect towards ZDICT_optimizeTrainFromBuffer_fastCover() single-threaded, with d=8, steps=4,"]
1083     #[doc = "  f=20, and accel=1."]
1084     #[doc = "  Samples must be stored concatenated in a single flat buffer `samplesBuffer`,"]
1085     #[doc = "  supplied with an array of sizes `samplesSizes`, providing the size of each sample, in order."]
1086     #[doc = "  The resulting dictionary will be saved into `dictBuffer`."]
1087     #[doc = " @return: size of dictionary stored into `dictBuffer` (<= `dictBufferCapacity`)"]
1088     #[doc = "          or an error code, which can be tested with ZDICT_isError()."]
1089     #[doc = "  Note:  Dictionary training will fail if there are not enough samples to construct a"]
1090     #[doc = "         dictionary, or if most of the samples are too small (< 8 bytes being the lower limit)."]
1091     #[doc = "         If dictionary training fails, you should use zstd without a dictionary, as the dictionary"]
1092     #[doc = "         would've been ineffective anyways. If you believe your samples would benefit from a dictionary"]
1093     #[doc = "         please open an issue with details, and we can look into it."]
1094     #[doc = "  Note: ZDICT_trainFromBuffer()'s memory usage is about 6 MB."]
1095     #[doc = "  Tips: In general, a reasonable dictionary has a size of ~ 100 KB."]
1096     #[doc = "        It's possible to select smaller or larger size, just by specifying `dictBufferCapacity`."]
1097     #[doc = "        In general, it's recommended to provide a few thousands samples, though this can vary a lot."]
1098     #[doc = "        It's recommended that total size of all samples be about ~x100 times the target size of dictionary."]
ZDICT_trainFromBuffer( dictBuffer: *mut ::core::ffi::c_void, dictBufferCapacity: usize, samplesBuffer: *const ::core::ffi::c_void, samplesSizes: *const usize, nbSamples: ::std::os::raw::c_uint, ) -> usize1099     pub fn ZDICT_trainFromBuffer(
1100         dictBuffer: *mut ::core::ffi::c_void,
1101         dictBufferCapacity: usize,
1102         samplesBuffer: *const ::core::ffi::c_void,
1103         samplesSizes: *const usize,
1104         nbSamples: ::std::os::raw::c_uint,
1105     ) -> usize;
1106 }
1107 #[repr(C)]
1108 #[derive(Debug, Copy, Clone)]
1109 pub struct ZDICT_params_t {
1110     pub compressionLevel: ::std::os::raw::c_int,
1111     pub notificationLevel: ::std::os::raw::c_uint,
1112     pub dictID: ::std::os::raw::c_uint,
1113 }
1114 #[test]
bindgen_test_layout_ZDICT_params_t()1115 fn bindgen_test_layout_ZDICT_params_t() {
1116     assert_eq!(
1117         ::core::mem::size_of::<ZDICT_params_t>(),
1118         12usize,
1119         concat!("Size of: ", stringify!(ZDICT_params_t))
1120     );
1121     assert_eq!(
1122         ::core::mem::align_of::<ZDICT_params_t>(),
1123         4usize,
1124         concat!("Alignment of ", stringify!(ZDICT_params_t))
1125     );
1126     assert_eq!(
1127         unsafe {
1128             &(*(::core::ptr::null::<ZDICT_params_t>())).compressionLevel
1129                 as *const _ as usize
1130         },
1131         0usize,
1132         concat!(
1133             "Offset of field: ",
1134             stringify!(ZDICT_params_t),
1135             "::",
1136             stringify!(compressionLevel)
1137         )
1138     );
1139     assert_eq!(
1140         unsafe {
1141             &(*(::core::ptr::null::<ZDICT_params_t>())).notificationLevel
1142                 as *const _ as usize
1143         },
1144         4usize,
1145         concat!(
1146             "Offset of field: ",
1147             stringify!(ZDICT_params_t),
1148             "::",
1149             stringify!(notificationLevel)
1150         )
1151     );
1152     assert_eq!(
1153         unsafe {
1154             &(*(::core::ptr::null::<ZDICT_params_t>())).dictID as *const _
1155                 as usize
1156         },
1157         8usize,
1158         concat!(
1159             "Offset of field: ",
1160             stringify!(ZDICT_params_t),
1161             "::",
1162             stringify!(dictID)
1163         )
1164     );
1165 }
1166 extern "C" {
1167     #[doc = " ZDICT_finalizeDictionary():"]
1168     #[doc = " Given a custom content as a basis for dictionary, and a set of samples,"]
1169     #[doc = " finalize dictionary by adding headers and statistics according to the zstd"]
1170     #[doc = " dictionary format."]
1171     #[doc = ""]
1172     #[doc = " Samples must be stored concatenated in a flat buffer `samplesBuffer`,"]
1173     #[doc = " supplied with an array of sizes `samplesSizes`, providing the size of each"]
1174     #[doc = " sample in order. The samples are used to construct the statistics, so they"]
1175     #[doc = " should be representative of what you will compress with this dictionary."]
1176     #[doc = ""]
1177     #[doc = " The compression level can be set in `parameters`. You should pass the"]
1178     #[doc = " compression level you expect to use in production. The statistics for each"]
1179     #[doc = " compression level differ, so tuning the dictionary for the compression level"]
1180     #[doc = " can help quite a bit."]
1181     #[doc = ""]
1182     #[doc = " You can set an explicit dictionary ID in `parameters`, or allow us to pick"]
1183     #[doc = " a random dictionary ID for you, but we can't guarantee no collisions."]
1184     #[doc = ""]
1185     #[doc = " The dstDictBuffer and the dictContent may overlap, and the content will be"]
1186     #[doc = " appended to the end of the header. If the header + the content doesn't fit in"]
1187     #[doc = " maxDictSize the beginning of the content is truncated to make room, since it"]
1188     #[doc = " is presumed that the most profitable content is at the end of the dictionary,"]
1189     #[doc = " since that is the cheapest to reference."]
1190     #[doc = ""]
1191     #[doc = " `dictContentSize` must be >= ZDICT_CONTENTSIZE_MIN bytes."]
1192     #[doc = " `maxDictSize` must be >= max(dictContentSize, ZSTD_DICTSIZE_MIN)."]
1193     #[doc = ""]
1194     #[doc = " @return: size of dictionary stored into `dstDictBuffer` (<= `maxDictSize`),"]
1195     #[doc = "          or an error code, which can be tested by ZDICT_isError()."]
1196     #[doc = " Note: ZDICT_finalizeDictionary() will push notifications into stderr if"]
1197     #[doc = "       instructed to, using notificationLevel>0."]
1198     #[doc = " NOTE: This function currently may fail in several edge cases including:"]
1199     #[doc = "         * Not enough samples"]
1200     #[doc = "         * Samples are uncompressible"]
1201     #[doc = "         * Samples are all exactly the same"]
ZDICT_finalizeDictionary( dstDictBuffer: *mut ::core::ffi::c_void, maxDictSize: usize, dictContent: *const ::core::ffi::c_void, dictContentSize: usize, samplesBuffer: *const ::core::ffi::c_void, samplesSizes: *const usize, nbSamples: ::std::os::raw::c_uint, parameters: ZDICT_params_t, ) -> usize1202     pub fn ZDICT_finalizeDictionary(
1203         dstDictBuffer: *mut ::core::ffi::c_void,
1204         maxDictSize: usize,
1205         dictContent: *const ::core::ffi::c_void,
1206         dictContentSize: usize,
1207         samplesBuffer: *const ::core::ffi::c_void,
1208         samplesSizes: *const usize,
1209         nbSamples: ::std::os::raw::c_uint,
1210         parameters: ZDICT_params_t,
1211     ) -> usize;
1212 }
1213 extern "C" {
ZDICT_getDictID( dictBuffer: *const ::core::ffi::c_void, dictSize: usize, ) -> ::std::os::raw::c_uint1214     pub fn ZDICT_getDictID(
1215         dictBuffer: *const ::core::ffi::c_void,
1216         dictSize: usize,
1217     ) -> ::std::os::raw::c_uint;
1218 }
1219 extern "C" {
ZDICT_getDictHeaderSize( dictBuffer: *const ::core::ffi::c_void, dictSize: usize, ) -> usize1220     pub fn ZDICT_getDictHeaderSize(
1221         dictBuffer: *const ::core::ffi::c_void,
1222         dictSize: usize,
1223     ) -> usize;
1224 }
1225 extern "C" {
ZDICT_isError(errorCode: usize) -> ::std::os::raw::c_uint1226     pub fn ZDICT_isError(errorCode: usize) -> ::std::os::raw::c_uint;
1227 }
1228 extern "C" {
ZDICT_getErrorName( errorCode: usize, ) -> *const ::std::os::raw::c_char1229     pub fn ZDICT_getErrorName(
1230         errorCode: usize,
1231     ) -> *const ::std::os::raw::c_char;
1232 }
1233