openzl_sys/opt/rustwide/workdir/
bindings.rs

1/* automatically generated by rust-bindgen 0.72.1 */
2
3pub const ZL_ERROR_ENABLE_STATIC_ERROR_INFO: u32 = 1;
4pub const ZL_ErrorCode_no_error__desc_str: &[u8; 9] = b"No Error\0";
5pub const ZL_ErrorCode_GENERIC__desc_str: &[u8; 8] = b"Generic\0";
6pub const ZL_ErrorCode_allocation__desc_str: &[u8; 11] = b"Allocation\0";
7pub const ZL_ErrorCode_srcSize_tooSmall__desc_str: &[u8; 22] = b"Source size too small\0";
8pub const ZL_ErrorCode_dstCapacity_tooSmall__desc_str: &[u8; 31] =
9    b"Destination capacity too small\0";
10pub const ZL_ErrorCode_userBuffer_alignmentIncorrect__desc_str: &[u8; 55] =
11    b"Buffer provided is incorrectly aligned for target type\0";
12pub const ZL_ErrorCode_userBuffers_invalidNum__desc_str: &[u8; 57] =
13    b"Nb of Typed Buffers provided is incorrect for this frame\0";
14pub const ZL_ErrorCode_decompression_incorrectAPI__desc_str: &[u8; 61] =
15    b"Used an invalid decompression API method for the target Type\0";
16pub const ZL_ErrorCode_header_unknown__desc_str: &[u8; 15] = b"Unknown header\0";
17pub const ZL_ErrorCode_frameParameter_unsupported__desc_str: &[u8; 28] =
18    b"Frame parameter unsupported\0";
19pub const ZL_ErrorCode_outputID_invalid__desc_str: &[u8; 37] =
20    b"Frame doesn't host this many outputs\0";
21pub const ZL_ErrorCode_invalidRequest_singleOutputFrameOnly__desc_str: &[u8; 65] =
22    b"This request only makes sense for Frames hosting a single Output\0";
23pub const ZL_ErrorCode_outputNotCommitted__desc_str: &[u8; 21] = b"Output not committed\0";
24pub const ZL_ErrorCode_outputNotReserved__desc_str: &[u8; 21] = b"Output has no buffer\0";
25pub const ZL_ErrorCode_compressionParameter_invalid__desc_str: &[u8; 30] =
26    b"Compression parameter invalid\0";
27pub const ZL_ErrorCode_segmenter_inputNotConsumed__desc_str: &[u8; 46] =
28    b"Segmenter did not consume entirely all inputs\0";
29pub const ZL_ErrorCode_graph_invalid__desc_str: &[u8; 14] = b"Graph invalid\0";
30pub const ZL_ErrorCode_graph_nonserializable__desc_str: &[u8; 38] =
31    b"Graph incompatible with serialization\0";
32pub const ZL_ErrorCode_graph_invalidNumInputs__desc_str: &[u8; 24] = b"Graph invalid nb inputs\0";
33pub const ZL_ErrorCode_successor_invalid__desc_str: &[u8; 36] =
34    b"Selected an invalid Successor Graph\0";
35pub const ZL_ErrorCode_successor_alreadySet__desc_str: &[u8; 49] =
36    b"A Successor was already assigned for this Stream\0";
37pub const ZL_ErrorCode_successor_invalidNumInputs__desc_str: &[u8; 53] =
38    b"Successor Graph receives an invalid number of Inputs\0";
39pub const ZL_ErrorCode_inputType_unsupported__desc_str: &[u8; 42] =
40    b"Input Type not supported by selected Port\0";
41pub const ZL_ErrorCode_graphParameter_invalid__desc_str: &[u8; 46] =
42    b"Graph was assigned an invalid Local Parameter\0";
43pub const ZL_ErrorCode_nodeParameter_invalid__desc_str: &[u8; 23] = b"Node parameter invalid\0";
44pub const ZL_ErrorCode_nodeParameter_invalidValue__desc_str: &[u8; 29] =
45    b"Node parameter invalid value\0";
46pub const ZL_ErrorCode_transform_executionFailure__desc_str: &[u8; 34] =
47    b"Transform failed during execution\0";
48pub const ZL_ErrorCode_customNode_definitionInvalid__desc_str: &[u8; 31] =
49    b"Custom node definition invalid\0";
50pub const ZL_ErrorCode_stream_wrongInit__desc_str: &[u8; 46] =
51    b"Stream is not in a valid initialization stage\0";
52pub const ZL_ErrorCode_streamType_incorrect__desc_str: &[u8; 35] =
53    b"An incompatible type is being used\0";
54pub const ZL_ErrorCode_streamCapacity_tooSmall__desc_str: &[u8; 43] =
55    b"Stream internal capacity is not sufficient\0";
56pub const ZL_ErrorCode_streamParameter_invalid__desc_str: &[u8; 25] = b"Stream parameter invalid\0";
57pub const ZL_ErrorCode_parameter_invalid__desc_str: &[u8; 21] = b"Parameter is invalid\0";
58pub const ZL_ErrorCode_formatVersion_unsupported__desc_str: &[u8; 27] =
59    b"Format version unsupported\0";
60pub const ZL_ErrorCode_formatVersion_notSet__desc_str: &[u8; 84] =
61    b"Format version is not set; it must be set via the ZL_CParam_formatVersion parameter\0";
62pub const ZL_ErrorCode_node_versionMismatch__desc_str: &[u8; 51] =
63    b"Node is incompatible with requested format version\0";
64pub const ZL_ErrorCode_node_unexpected_input_type__desc_str: &[u8; 31] =
65    b"Unexpected input type for node\0";
66pub const ZL_ErrorCode_node_invalid_input__desc_str: &[u8; 48] =
67    b"Input does not respect conditions for this node\0";
68pub const ZL_ErrorCode_node_invalid__desc_str: &[u8; 16] = b"Invalid Node ID\0";
69pub const ZL_ErrorCode_nodeExecution_invalidOutputs__desc_str: &[u8; 69] =
70    b"node execution has resulted in an incorrect configuration of outputs\0";
71pub const ZL_ErrorCode_nodeRegen_countIncorrect__desc_str: &[u8; 63] =
72    b"node is requested to regenerate an incorrect number of streams\0";
73pub const ZL_ErrorCode_logicError__desc_str: &[u8; 21] = b"Internal logic error\0";
74pub const ZL_ErrorCode_invalidTransform__desc_str: &[u8; 21] = b"Invalid transform ID\0";
75pub const ZL_ErrorCode_internalBuffer_tooSmall__desc_str: &[u8; 26] =
76    b"Internal buffer too small\0";
77pub const ZL_ErrorCode_corruption__desc_str: &[u8; 20] = b"Corruption detected\0";
78pub const ZL_ErrorCode_outputs_tooNumerous__desc_str: &[u8; 56] =
79    b"Too many outputs: unsupported by claimed format version\0";
80pub const ZL_ErrorCode_temporaryLibraryLimitation__desc_str: &[u8; 36] =
81    b"Temporary OpenZL library limitation\0";
82pub const ZL_ErrorCode_compressedChecksumWrong__desc_str: &[u8; 60] =
83    b"Compressed checksum mismatch (corruption after compression)\0";
84pub const ZL_ErrorCode_contentChecksumWrong__desc_str : & [u8 ; 114] = b"Content checksum mismatch (either corruption after compression or corruption during compression or decompression)\0" ;
85pub const ZL_ErrorCode_srcSize_tooLarge__desc_str: &[u8; 22] = b"Source size too large\0";
86pub const ZL_ErrorCode_integerOverflow__desc_str: &[u8; 17] = b"Integer overflow\0";
87pub const ZL_ErrorCode_invalidName__desc_str: &[u8; 32] = b"Invalid name of graph component\0";
88pub const ZL_ENABLE_RET_IF_ARG_PRINTING: u32 = 1;
89pub const ZL_ENABLE_ERR_IF_ARG_PRINTING: u32 = 1;
90pub const ZL_LIBRARY_VERSION_MAJOR: u32 = 0;
91pub const ZL_LIBRARY_VERSION_MINOR: u32 = 1;
92pub const ZL_LIBRARY_VERSION_PATCH: u32 = 0;
93pub const ZL_LIBRARY_VERSION_NUMBER: u32 = 100;
94pub const ZL_FBCODE_IS_RELEASE: u32 = 0;
95pub const ZL_MIN_FORMAT_VERSION: u32 = 8;
96pub const ZL_MAX_FORMAT_VERSION: u32 = 21;
97pub const ZL_CHUNK_VERSION_MIN: u32 = 21;
98pub const ZL_TYPED_INPUT_VERSION_MIN: u32 = 14;
99pub const ZL_COMPRESSIONLEVEL_DEFAULT: u32 = 6;
100pub const ZL_DECOMPRESSIONLEVEL_DEFAULT: u32 = 3;
101pub const ZL_MINSTREAMSIZE_DEFAULT: u32 = 10;
102pub const ZL_CONVERT_SERIAL_TO_STRUCT_SIZE_PID: u32 = 1;
103pub const ZL_DISPATCH_PARSINGFN_PID: u32 = 519;
104pub const ZL_DISPATCH_INSTRUCTIONS_PID: u32 = 520;
105pub const ZL_DISPATCH_CHANNEL_ID: u32 = 83;
106pub const ZL_DISPATCH_STRING_NUM_OUTPUTS_PID: u32 = 47;
107pub const ZL_DISPATCH_STRING_INDICES_PID: u32 = 48;
108pub const ZL_DIVIDE_BY_PID: u32 = 112;
109pub const ZL_FIELD_LZ_COMPRESSION_LEVEL_OVERRIDE_PID: u32 = 181;
110pub const ZL_FIELD_LZ_LITERALS_GRAPH_OVERRIDE_INDEX_PID: u32 = 0;
111pub const ZL_FIELD_LZ_TOKENS_GRAPH_OVERRIDE_INDEX_PID: u32 = 1;
112pub const ZL_FIELD_LZ_OFFSETS_GRAPH_OVERRIDE_INDEX_PID: u32 = 2;
113pub const ZL_FIELD_LZ_EXTRA_LITERAL_LENGTHS_GRAPH_OVERRIDE_INDEX_PID: u32 = 3;
114pub const ZL_FIELD_LZ_EXTRA_MATCH_LENGTHS_GRAPH_OVERRIDE_INDEX_PID: u32 = 4;
115pub const ZL_SDDL_DESCRIPTION_PID: u32 = 522;
116pub const ZL_SPLIT_CHANNEL_ID: u32 = 867;
117pub const ZL_TOKENIZE_SORT_PID: u32 = 0;
118pub const ZL_HAVE_FBCODE: u32 = 1;
119pub const ZL_HAVE_X86_64_ASM: u32 = 1;
120pub const ZL_ALLOW_INTROSPECTION: u32 = 1;
121pub const ZL_LP_INVALID_PARAMID: i32 = -1;
122#[repr(C)]
123#[derive(Debug, Copy, Clone)]
124pub struct ZL_WBuffer {
125    pub start: *mut ::std::os::raw::c_void,
126    pub capacity: usize,
127}
128#[test]
129fn bindgen_test_layout_ZL_WBuffer() {
130    const UNINIT: ::std::mem::MaybeUninit<ZL_WBuffer> = ::std::mem::MaybeUninit::uninit();
131    let ptr = UNINIT.as_ptr();
132    assert_eq!(
133        ::std::mem::size_of::<ZL_WBuffer>(),
134        16usize,
135        "Size of ZL_WBuffer"
136    );
137    assert_eq!(
138        ::std::mem::align_of::<ZL_WBuffer>(),
139        8usize,
140        "Alignment of ZL_WBuffer"
141    );
142    assert_eq!(
143        unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
144        0usize,
145        "Offset of field: ZL_WBuffer::start"
146    );
147    assert_eq!(
148        unsafe { ::std::ptr::addr_of!((*ptr).capacity) as usize - ptr as usize },
149        8usize,
150        "Offset of field: ZL_WBuffer::capacity"
151    );
152}
153#[repr(C)]
154#[derive(Debug, Copy, Clone)]
155pub struct ZL_WCursor {
156    pub wb: ZL_WBuffer,
157    pub pos: usize,
158}
159#[test]
160fn bindgen_test_layout_ZL_WCursor() {
161    const UNINIT: ::std::mem::MaybeUninit<ZL_WCursor> = ::std::mem::MaybeUninit::uninit();
162    let ptr = UNINIT.as_ptr();
163    assert_eq!(
164        ::std::mem::size_of::<ZL_WCursor>(),
165        24usize,
166        "Size of ZL_WCursor"
167    );
168    assert_eq!(
169        ::std::mem::align_of::<ZL_WCursor>(),
170        8usize,
171        "Alignment of ZL_WCursor"
172    );
173    assert_eq!(
174        unsafe { ::std::ptr::addr_of!((*ptr).wb) as usize - ptr as usize },
175        0usize,
176        "Offset of field: ZL_WCursor::wb"
177    );
178    assert_eq!(
179        unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize },
180        16usize,
181        "Offset of field: ZL_WCursor::pos"
182    );
183}
184#[repr(C)]
185#[derive(Debug, Copy, Clone)]
186pub struct ZL_RBuffer {
187    pub start: *const ::std::os::raw::c_void,
188    pub size: usize,
189}
190#[test]
191fn bindgen_test_layout_ZL_RBuffer() {
192    const UNINIT: ::std::mem::MaybeUninit<ZL_RBuffer> = ::std::mem::MaybeUninit::uninit();
193    let ptr = UNINIT.as_ptr();
194    assert_eq!(
195        ::std::mem::size_of::<ZL_RBuffer>(),
196        16usize,
197        "Size of ZL_RBuffer"
198    );
199    assert_eq!(
200        ::std::mem::align_of::<ZL_RBuffer>(),
201        8usize,
202        "Alignment of ZL_RBuffer"
203    );
204    assert_eq!(
205        unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
206        0usize,
207        "Offset of field: ZL_RBuffer::start"
208    );
209    assert_eq!(
210        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
211        8usize,
212        "Offset of field: ZL_RBuffer::size"
213    );
214}
215pub type ZL_IDType = ::std::os::raw::c_uint;
216#[repr(C)]
217#[derive(Debug, Copy, Clone)]
218pub struct ZL_DataID {
219    pub sid: ZL_IDType,
220}
221#[test]
222fn bindgen_test_layout_ZL_DataID() {
223    const UNINIT: ::std::mem::MaybeUninit<ZL_DataID> = ::std::mem::MaybeUninit::uninit();
224    let ptr = UNINIT.as_ptr();
225    assert_eq!(
226        ::std::mem::size_of::<ZL_DataID>(),
227        4usize,
228        "Size of ZL_DataID"
229    );
230    assert_eq!(
231        ::std::mem::align_of::<ZL_DataID>(),
232        4usize,
233        "Alignment of ZL_DataID"
234    );
235    assert_eq!(
236        unsafe { ::std::ptr::addr_of!((*ptr).sid) as usize - ptr as usize },
237        0usize,
238        "Offset of field: ZL_DataID::sid"
239    );
240}
241#[repr(C)]
242#[derive(Debug, Copy, Clone)]
243pub struct ZL_NodeID {
244    pub nid: ZL_IDType,
245}
246#[test]
247fn bindgen_test_layout_ZL_NodeID() {
248    const UNINIT: ::std::mem::MaybeUninit<ZL_NodeID> = ::std::mem::MaybeUninit::uninit();
249    let ptr = UNINIT.as_ptr();
250    assert_eq!(
251        ::std::mem::size_of::<ZL_NodeID>(),
252        4usize,
253        "Size of ZL_NodeID"
254    );
255    assert_eq!(
256        ::std::mem::align_of::<ZL_NodeID>(),
257        4usize,
258        "Alignment of ZL_NodeID"
259    );
260    assert_eq!(
261        unsafe { ::std::ptr::addr_of!((*ptr).nid) as usize - ptr as usize },
262        0usize,
263        "Offset of field: ZL_NodeID::nid"
264    );
265}
266#[repr(C)]
267#[derive(Debug, Copy, Clone)]
268pub struct ZL_GraphID {
269    pub gid: ZL_IDType,
270}
271#[test]
272fn bindgen_test_layout_ZL_GraphID() {
273    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphID> = ::std::mem::MaybeUninit::uninit();
274    let ptr = UNINIT.as_ptr();
275    assert_eq!(
276        ::std::mem::size_of::<ZL_GraphID>(),
277        4usize,
278        "Size of ZL_GraphID"
279    );
280    assert_eq!(
281        ::std::mem::align_of::<ZL_GraphID>(),
282        4usize,
283        "Alignment of ZL_GraphID"
284    );
285    assert_eq!(
286        unsafe { ::std::ptr::addr_of!((*ptr).gid) as usize - ptr as usize },
287        0usize,
288        "Offset of field: ZL_GraphID::gid"
289    );
290}
291#[repr(C)]
292#[derive(Debug, Copy, Clone)]
293pub struct ZL_Data_s {
294    _unused: [u8; 0],
295}
296pub type ZL_Data = ZL_Data_s;
297#[repr(C)]
298#[derive(Debug, Copy, Clone)]
299pub struct ZL_Input_s {
300    _unused: [u8; 0],
301}
302pub type ZL_Input = ZL_Input_s;
303#[repr(C)]
304#[derive(Debug, Copy, Clone)]
305pub struct ZL_Output_s {
306    _unused: [u8; 0],
307}
308pub type ZL_Output = ZL_Output_s;
309pub type ZL_TypedRef = ZL_Input;
310#[repr(C)]
311#[derive(Debug, Copy, Clone)]
312pub struct ZL_Compressor_s {
313    _unused: [u8; 0],
314}
315#[doc = " @defgroup Group_Compressor_LifetimeManagement Lifetime Management\n\n @{"]
316pub type ZL_Compressor = ZL_Compressor_s;
317#[repr(C)]
318#[derive(Debug, Copy, Clone)]
319pub struct ZL_CompressorSerializer_s {
320    _unused: [u8; 0],
321}
322pub type ZL_CompressorSerializer = ZL_CompressorSerializer_s;
323#[repr(C)]
324#[derive(Debug, Copy, Clone)]
325pub struct ZL_CompressorDeserializer_s {
326    _unused: [u8; 0],
327}
328pub type ZL_CompressorDeserializer = ZL_CompressorDeserializer_s;
329#[repr(C)]
330#[derive(Debug, Copy, Clone)]
331pub struct ZL_CCtx_s {
332    _unused: [u8; 0],
333}
334pub type ZL_CCtx = ZL_CCtx_s;
335#[repr(C)]
336#[derive(Debug, Copy, Clone)]
337pub struct ZL_DCtx_s {
338    _unused: [u8; 0],
339}
340#[doc = " @brief Decompression context for state management (incomplete type)."]
341pub type ZL_DCtx = ZL_DCtx_s;
342#[repr(C)]
343#[derive(Debug, Copy, Clone)]
344pub struct ZL_Encoder_s {
345    _unused: [u8; 0],
346}
347pub type ZL_Encoder = ZL_Encoder_s;
348#[repr(C)]
349#[derive(Debug, Copy, Clone)]
350pub struct ZL_Decoder_s {
351    _unused: [u8; 0],
352}
353pub type ZL_Decoder = ZL_Decoder_s;
354#[repr(C)]
355#[derive(Debug, Copy, Clone)]
356pub struct ZL_Selector_s {
357    _unused: [u8; 0],
358}
359pub type ZL_Selector = ZL_Selector_s;
360#[repr(C)]
361#[derive(Debug, Copy, Clone)]
362pub struct ZL_Graph_s {
363    _unused: [u8; 0],
364}
365pub type ZL_Graph = ZL_Graph_s;
366#[repr(C)]
367#[derive(Debug, Copy, Clone)]
368pub struct ZL_Edge_s {
369    _unused: [u8; 0],
370}
371pub type ZL_Edge = ZL_Edge_s;
372pub const ZL_TernaryParam_auto: ZL_TernaryParam = 0;
373pub const ZL_TernaryParam_enable: ZL_TernaryParam = 1;
374pub const ZL_TernaryParam_disable: ZL_TernaryParam = 2;
375pub type ZL_TernaryParam = ::std::os::raw::c_uint;
376#[repr(C)]
377#[derive(Debug, Copy, Clone)]
378pub struct ZL_OpaquePtr {
379    #[doc = " Opaque pointer that is passed back to the user when calling functions\n like:\n - ZL_Encoder_getOpaquePtr()\n - ZL_Decoder_getOpaquePtr()\n - ZL_Graph_getOpaquePtr()\n - ZL_Selector_getOpaquePtr()"]
380    pub ptr: *mut ::std::os::raw::c_void,
381    #[doc = " Additional pointer passed to the free function.\n This additional pointer allows, for example, to use a C++ lambda as a\n free function."]
382    pub freeOpaquePtr: *mut ::std::os::raw::c_void,
383    #[doc = " Frees the ZL_OpaquePtr::ptr, and if needed also the\n ZL_OpaquePtr::freeOpaquePtr. This function is called exactly once by\n OpenZL once the opaque pointer has been registered.\n If freeFn is NULL, then it is not called."]
384    pub freeFn: ::std::option::Option<
385        unsafe extern "C" fn(
386            freeOpaquePtr: *mut ::std::os::raw::c_void,
387            ptr: *mut ::std::os::raw::c_void,
388        ),
389    >,
390}
391#[test]
392fn bindgen_test_layout_ZL_OpaquePtr() {
393    const UNINIT: ::std::mem::MaybeUninit<ZL_OpaquePtr> = ::std::mem::MaybeUninit::uninit();
394    let ptr = UNINIT.as_ptr();
395    assert_eq!(
396        ::std::mem::size_of::<ZL_OpaquePtr>(),
397        24usize,
398        "Size of ZL_OpaquePtr"
399    );
400    assert_eq!(
401        ::std::mem::align_of::<ZL_OpaquePtr>(),
402        8usize,
403        "Alignment of ZL_OpaquePtr"
404    );
405    assert_eq!(
406        unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize },
407        0usize,
408        "Offset of field: ZL_OpaquePtr::ptr"
409    );
410    assert_eq!(
411        unsafe { ::std::ptr::addr_of!((*ptr).freeOpaquePtr) as usize - ptr as usize },
412        8usize,
413        "Offset of field: ZL_OpaquePtr::freeOpaquePtr"
414    );
415    assert_eq!(
416        unsafe { ::std::ptr::addr_of!((*ptr).freeFn) as usize - ptr as usize },
417        16usize,
418        "Offset of field: ZL_OpaquePtr::freeFn"
419    );
420}
421#[repr(C)]
422#[derive(Debug, Copy, Clone)]
423pub struct ZL_GraphIDList {
424    pub graphids: *const ZL_GraphID,
425    pub nbGraphIDs: usize,
426}
427#[test]
428fn bindgen_test_layout_ZL_GraphIDList() {
429    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphIDList> = ::std::mem::MaybeUninit::uninit();
430    let ptr = UNINIT.as_ptr();
431    assert_eq!(
432        ::std::mem::size_of::<ZL_GraphIDList>(),
433        16usize,
434        "Size of ZL_GraphIDList"
435    );
436    assert_eq!(
437        ::std::mem::align_of::<ZL_GraphIDList>(),
438        8usize,
439        "Alignment of ZL_GraphIDList"
440    );
441    assert_eq!(
442        unsafe { ::std::ptr::addr_of!((*ptr).graphids) as usize - ptr as usize },
443        0usize,
444        "Offset of field: ZL_GraphIDList::graphids"
445    );
446    assert_eq!(
447        unsafe { ::std::ptr::addr_of!((*ptr).nbGraphIDs) as usize - ptr as usize },
448        8usize,
449        "Offset of field: ZL_GraphIDList::nbGraphIDs"
450    );
451}
452#[repr(C)]
453#[derive(Debug, Copy, Clone)]
454pub struct ZL_NodeIDList {
455    pub nodeids: *const ZL_NodeID,
456    pub nbNodeIDs: usize,
457}
458#[test]
459fn bindgen_test_layout_ZL_NodeIDList() {
460    const UNINIT: ::std::mem::MaybeUninit<ZL_NodeIDList> = ::std::mem::MaybeUninit::uninit();
461    let ptr = UNINIT.as_ptr();
462    assert_eq!(
463        ::std::mem::size_of::<ZL_NodeIDList>(),
464        16usize,
465        "Size of ZL_NodeIDList"
466    );
467    assert_eq!(
468        ::std::mem::align_of::<ZL_NodeIDList>(),
469        8usize,
470        "Alignment of ZL_NodeIDList"
471    );
472    assert_eq!(
473        unsafe { ::std::ptr::addr_of!((*ptr).nodeids) as usize - ptr as usize },
474        0usize,
475        "Offset of field: ZL_NodeIDList::nodeids"
476    );
477    assert_eq!(
478        unsafe { ::std::ptr::addr_of!((*ptr).nbNodeIDs) as usize - ptr as usize },
479        8usize,
480        "Offset of field: ZL_NodeIDList::nbNodeIDs"
481    );
482}
483#[repr(C)]
484#[derive(Debug, Copy, Clone)]
485pub struct ZL_DynamicErrorInfo_s {
486    _unused: [u8; 0],
487}
488#[doc = " Forward Declarations *"]
489pub type ZL_DynamicErrorInfo = ZL_DynamicErrorInfo_s;
490#[doc = " ZL_StaticErrorInfo *"]
491pub type ZL_StaticErrorInfo = ZL_StaticErrorInfo_s;
492#[doc = " ZL_Error:\n\n The ZL_Error represents an optional failure. (If _code is\n ZL_ErrorCode_no_error, the object represents a success condition.) Depending\n on how it was constructed, the error may be \"bare\" (_info == NULL) or \"rich\",\n in which case it has an _info struct that can contain additional context and\n information about the error.\n\n The ZL_Error is usually returned-by-value, and therefore the definition\n needs to be publicly available. However, users should not directly interact\n with the members of the struct, and should instead use the various accessors\n and methods made available in the public API."]
493pub type ZL_Error = ZL_Error_s;
494#[doc = " Internally, there are two kinds of error info objects: dynamic and static,\n which are, like they sound, respectively dynamically allocated (and which\n must be freed) or statically allocated, but which therefore can't contain\n any runtime information.\n\n You should never assign or dereference these pointers directly:\n\n 1. We pack metadata into the unused bits of the pointers, which needs to be\n    masked out to retrieve the actual pointer.\n 2. You need interact with that metadata to figure out or set which pointer\n    is active.\n\n Instead:\n\n You should use @ref ZL_E_dy or @ref ZL_E_st to check for the presence of and\n to extract the (possibly NULL) pointers to the sub-types.\n\n You should use @ref ZL_EI_fromDy or @ref ZL_EI_fromSt to construct this\n object from one of those pointer."]
495pub type ZL_ErrorInfo = ZL_ErrorInfo_u;
496pub const ZL_ErrorCode_no_error: ZL_ErrorCode = 0;
497pub const ZL_ErrorCode_GENERIC: ZL_ErrorCode = 1;
498pub const ZL_ErrorCode_srcSize_tooSmall: ZL_ErrorCode = 3;
499pub const ZL_ErrorCode_srcSize_tooLarge: ZL_ErrorCode = 4;
500pub const ZL_ErrorCode_dstCapacity_tooSmall: ZL_ErrorCode = 5;
501pub const ZL_ErrorCode_userBuffer_alignmentIncorrect: ZL_ErrorCode = 6;
502pub const ZL_ErrorCode_decompression_incorrectAPI: ZL_ErrorCode = 7;
503pub const ZL_ErrorCode_userBuffers_invalidNum: ZL_ErrorCode = 8;
504pub const ZL_ErrorCode_invalidName: ZL_ErrorCode = 9;
505pub const ZL_ErrorCode_header_unknown: ZL_ErrorCode = 10;
506pub const ZL_ErrorCode_frameParameter_unsupported: ZL_ErrorCode = 11;
507pub const ZL_ErrorCode_corruption: ZL_ErrorCode = 12;
508pub const ZL_ErrorCode_compressedChecksumWrong: ZL_ErrorCode = 13;
509pub const ZL_ErrorCode_contentChecksumWrong: ZL_ErrorCode = 14;
510pub const ZL_ErrorCode_outputs_tooNumerous: ZL_ErrorCode = 15;
511pub const ZL_ErrorCode_compressionParameter_invalid: ZL_ErrorCode = 20;
512pub const ZL_ErrorCode_parameter_invalid: ZL_ErrorCode = 21;
513pub const ZL_ErrorCode_outputID_invalid: ZL_ErrorCode = 22;
514pub const ZL_ErrorCode_invalidRequest_singleOutputFrameOnly: ZL_ErrorCode = 23;
515pub const ZL_ErrorCode_outputNotCommitted: ZL_ErrorCode = 24;
516pub const ZL_ErrorCode_outputNotReserved: ZL_ErrorCode = 25;
517pub const ZL_ErrorCode_segmenter_inputNotConsumed: ZL_ErrorCode = 26;
518pub const ZL_ErrorCode_graph_invalid: ZL_ErrorCode = 30;
519pub const ZL_ErrorCode_graph_nonserializable: ZL_ErrorCode = 31;
520pub const ZL_ErrorCode_invalidTransform: ZL_ErrorCode = 32;
521pub const ZL_ErrorCode_graph_invalidNumInputs: ZL_ErrorCode = 33;
522pub const ZL_ErrorCode_successor_invalid: ZL_ErrorCode = 40;
523pub const ZL_ErrorCode_successor_alreadySet: ZL_ErrorCode = 41;
524pub const ZL_ErrorCode_successor_invalidNumInputs: ZL_ErrorCode = 42;
525pub const ZL_ErrorCode_inputType_unsupported: ZL_ErrorCode = 43;
526pub const ZL_ErrorCode_graphParameter_invalid: ZL_ErrorCode = 44;
527pub const ZL_ErrorCode_nodeParameter_invalid: ZL_ErrorCode = 50;
528pub const ZL_ErrorCode_nodeParameter_invalidValue: ZL_ErrorCode = 51;
529pub const ZL_ErrorCode_transform_executionFailure: ZL_ErrorCode = 52;
530pub const ZL_ErrorCode_customNode_definitionInvalid: ZL_ErrorCode = 53;
531pub const ZL_ErrorCode_node_unexpected_input_type: ZL_ErrorCode = 54;
532pub const ZL_ErrorCode_node_invalid_input: ZL_ErrorCode = 55;
533pub const ZL_ErrorCode_node_invalid: ZL_ErrorCode = 56;
534pub const ZL_ErrorCode_nodeExecution_invalidOutputs: ZL_ErrorCode = 57;
535pub const ZL_ErrorCode_nodeRegen_countIncorrect: ZL_ErrorCode = 58;
536pub const ZL_ErrorCode_formatVersion_unsupported: ZL_ErrorCode = 60;
537pub const ZL_ErrorCode_formatVersion_notSet: ZL_ErrorCode = 61;
538pub const ZL_ErrorCode_node_versionMismatch: ZL_ErrorCode = 62;
539pub const ZL_ErrorCode_allocation: ZL_ErrorCode = 70;
540pub const ZL_ErrorCode_internalBuffer_tooSmall: ZL_ErrorCode = 71;
541pub const ZL_ErrorCode_integerOverflow: ZL_ErrorCode = 72;
542pub const ZL_ErrorCode_stream_wrongInit: ZL_ErrorCode = 73;
543pub const ZL_ErrorCode_streamType_incorrect: ZL_ErrorCode = 74;
544pub const ZL_ErrorCode_streamCapacity_tooSmall: ZL_ErrorCode = 75;
545pub const ZL_ErrorCode_streamParameter_invalid: ZL_ErrorCode = 76;
546pub const ZL_ErrorCode_logicError: ZL_ErrorCode = 80;
547pub const ZL_ErrorCode_temporaryLibraryLimitation: ZL_ErrorCode = 81;
548pub const ZL_ErrorCode_maxCode: ZL_ErrorCode = 99;
549#[doc = " ZL_ErrorCode *"]
550pub type ZL_ErrorCode = ::std::os::raw::c_uint;
551#[repr(C)]
552#[derive(Debug, Copy, Clone)]
553pub struct ZL_OperationContext_s {
554    _unused: [u8; 0],
555}
556pub type ZL_OperationContext = ZL_OperationContext_s;
557#[repr(C)]
558#[derive(Debug, Copy, Clone)]
559pub struct ZL_GraphContext {
560    #[doc = " The current nodeID or 0 for unset / unknown."]
561    pub nodeID: ZL_NodeID,
562    #[doc = " The current graphID or 0 for unset / unknown."]
563    pub graphID: ZL_GraphID,
564    #[doc = " The current transformID or 0 for unset / unknown."]
565    pub transformID: ZL_IDType,
566    #[doc = " The name of the component, may be NULL."]
567    pub name: *const ::std::os::raw::c_char,
568}
569#[test]
570fn bindgen_test_layout_ZL_GraphContext() {
571    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphContext> = ::std::mem::MaybeUninit::uninit();
572    let ptr = UNINIT.as_ptr();
573    assert_eq!(
574        ::std::mem::size_of::<ZL_GraphContext>(),
575        24usize,
576        "Size of ZL_GraphContext"
577    );
578    assert_eq!(
579        ::std::mem::align_of::<ZL_GraphContext>(),
580        8usize,
581        "Alignment of ZL_GraphContext"
582    );
583    assert_eq!(
584        unsafe { ::std::ptr::addr_of!((*ptr).nodeID) as usize - ptr as usize },
585        0usize,
586        "Offset of field: ZL_GraphContext::nodeID"
587    );
588    assert_eq!(
589        unsafe { ::std::ptr::addr_of!((*ptr).graphID) as usize - ptr as usize },
590        4usize,
591        "Offset of field: ZL_GraphContext::graphID"
592    );
593    assert_eq!(
594        unsafe { ::std::ptr::addr_of!((*ptr).transformID) as usize - ptr as usize },
595        8usize,
596        "Offset of field: ZL_GraphContext::transformID"
597    );
598    assert_eq!(
599        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
600        16usize,
601        "Offset of field: ZL_GraphContext::name"
602    );
603}
604#[repr(C)]
605#[derive(Debug, Copy, Clone)]
606pub struct ZL_ErrorContext {
607    #[doc = " Pointer to the operation context to store dynamic error info in, or NULL\n to opt out of dynamic error info."]
608    pub opCtx: *mut ZL_OperationContext,
609    pub graphCtx: ZL_GraphContext,
610}
611#[test]
612fn bindgen_test_layout_ZL_ErrorContext() {
613    const UNINIT: ::std::mem::MaybeUninit<ZL_ErrorContext> = ::std::mem::MaybeUninit::uninit();
614    let ptr = UNINIT.as_ptr();
615    assert_eq!(
616        ::std::mem::size_of::<ZL_ErrorContext>(),
617        32usize,
618        "Size of ZL_ErrorContext"
619    );
620    assert_eq!(
621        ::std::mem::align_of::<ZL_ErrorContext>(),
622        8usize,
623        "Alignment of ZL_ErrorContext"
624    );
625    assert_eq!(
626        unsafe { ::std::ptr::addr_of!((*ptr).opCtx) as usize - ptr as usize },
627        0usize,
628        "Offset of field: ZL_ErrorContext::opCtx"
629    );
630    assert_eq!(
631        unsafe { ::std::ptr::addr_of!((*ptr).graphCtx) as usize - ptr as usize },
632        8usize,
633        "Offset of field: ZL_ErrorContext::graphCtx"
634    );
635}
636extern "C" {
637    pub fn ZL_Compressor_getOperationContext(ctx: *mut ZL_Compressor) -> *mut ZL_OperationContext;
638}
639extern "C" {
640    pub fn ZL_CCtx_getOperationContext(ctx: *mut ZL_CCtx) -> *mut ZL_OperationContext;
641}
642extern "C" {
643    pub fn ZL_DCtx_getOperationContext(ctx: *mut ZL_DCtx) -> *mut ZL_OperationContext;
644}
645extern "C" {
646    pub fn ZL_Encoder_getOperationContext(ctx: *mut ZL_Encoder) -> *mut ZL_OperationContext;
647}
648extern "C" {
649    pub fn ZL_Decoder_getOperationContext(ctx: *mut ZL_Decoder) -> *mut ZL_OperationContext;
650}
651extern "C" {
652    pub fn ZL_Graph_getOperationContext(ctx: *mut ZL_Graph) -> *mut ZL_OperationContext;
653}
654extern "C" {
655    pub fn ZL_Edge_getOperationContext(ctx: *mut ZL_Edge) -> *mut ZL_OperationContext;
656}
657extern "C" {
658    pub fn ZL_CompressorSerializer_getOperationContext(
659        ctx: *mut ZL_CompressorSerializer,
660    ) -> *mut ZL_OperationContext;
661}
662extern "C" {
663    pub fn ZL_CompressorDeserializer_getOperationContext(
664        ctx: *mut ZL_CompressorDeserializer,
665    ) -> *mut ZL_OperationContext;
666}
667extern "C" {
668    pub fn ZL_ErrorContext_getOperationContext(
669        ctx: *mut ZL_ErrorContext,
670    ) -> *mut ZL_OperationContext;
671}
672extern "C" {
673    pub fn ZL_NULL_getOperationContext(
674        ctx: *mut ::std::os::raw::c_void,
675    ) -> *mut ZL_OperationContext;
676}
677extern "C" {
678    pub fn ZL_OperationContext_getDefaultErrorContext(
679        opCtx: *mut ZL_OperationContext,
680    ) -> *mut ZL_ErrorContext;
681}
682#[doc = " ZL_StaticErrorInfo *"]
683#[repr(C)]
684#[derive(Debug, Copy, Clone)]
685pub struct ZL_StaticErrorInfo_s {
686    pub code: ZL_ErrorCode,
687    pub fmt: *const ::std::os::raw::c_char,
688    pub file: *const ::std::os::raw::c_char,
689    pub func: *const ::std::os::raw::c_char,
690    pub line: ::std::os::raw::c_int,
691}
692#[test]
693fn bindgen_test_layout_ZL_StaticErrorInfo_s() {
694    const UNINIT: ::std::mem::MaybeUninit<ZL_StaticErrorInfo_s> = ::std::mem::MaybeUninit::uninit();
695    let ptr = UNINIT.as_ptr();
696    assert_eq!(
697        ::std::mem::size_of::<ZL_StaticErrorInfo_s>(),
698        40usize,
699        "Size of ZL_StaticErrorInfo_s"
700    );
701    assert_eq!(
702        ::std::mem::align_of::<ZL_StaticErrorInfo_s>(),
703        8usize,
704        "Alignment of ZL_StaticErrorInfo_s"
705    );
706    assert_eq!(
707        unsafe { ::std::ptr::addr_of!((*ptr).code) as usize - ptr as usize },
708        0usize,
709        "Offset of field: ZL_StaticErrorInfo_s::code"
710    );
711    assert_eq!(
712        unsafe { ::std::ptr::addr_of!((*ptr).fmt) as usize - ptr as usize },
713        8usize,
714        "Offset of field: ZL_StaticErrorInfo_s::fmt"
715    );
716    assert_eq!(
717        unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize },
718        16usize,
719        "Offset of field: ZL_StaticErrorInfo_s::file"
720    );
721    assert_eq!(
722        unsafe { ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize },
723        24usize,
724        "Offset of field: ZL_StaticErrorInfo_s::func"
725    );
726    assert_eq!(
727        unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize },
728        32usize,
729        "Offset of field: ZL_StaticErrorInfo_s::line"
730    );
731}
732#[doc = " Internally, there are two kinds of error info objects: dynamic and static,\n which are, like they sound, respectively dynamically allocated (and which\n must be freed) or statically allocated, but which therefore can't contain\n any runtime information.\n\n You should never assign or dereference these pointers directly:\n\n 1. We pack metadata into the unused bits of the pointers, which needs to be\n    masked out to retrieve the actual pointer.\n 2. You need interact with that metadata to figure out or set which pointer\n    is active.\n\n Instead:\n\n You should use @ref ZL_E_dy or @ref ZL_E_st to check for the presence of and\n to extract the (possibly NULL) pointers to the sub-types.\n\n You should use @ref ZL_EI_fromDy or @ref ZL_EI_fromSt to construct this\n object from one of those pointer."]
733#[repr(C)]
734#[derive(Copy, Clone)]
735pub union ZL_ErrorInfo_u {
736    pub _dy: *mut ZL_DynamicErrorInfo,
737    pub _st: *const ZL_StaticErrorInfo,
738}
739#[test]
740fn bindgen_test_layout_ZL_ErrorInfo_u() {
741    const UNINIT: ::std::mem::MaybeUninit<ZL_ErrorInfo_u> = ::std::mem::MaybeUninit::uninit();
742    let ptr = UNINIT.as_ptr();
743    assert_eq!(
744        ::std::mem::size_of::<ZL_ErrorInfo_u>(),
745        8usize,
746        "Size of ZL_ErrorInfo_u"
747    );
748    assert_eq!(
749        ::std::mem::align_of::<ZL_ErrorInfo_u>(),
750        8usize,
751        "Alignment of ZL_ErrorInfo_u"
752    );
753    assert_eq!(
754        unsafe { ::std::ptr::addr_of!((*ptr)._dy) as usize - ptr as usize },
755        0usize,
756        "Offset of field: ZL_ErrorInfo_u::_dy"
757    );
758    assert_eq!(
759        unsafe { ::std::ptr::addr_of!((*ptr)._st) as usize - ptr as usize },
760        0usize,
761        "Offset of field: ZL_ErrorInfo_u::_st"
762    );
763}
764#[doc = " ZL_Error:\n\n The ZL_Error represents an optional failure. (If _code is\n ZL_ErrorCode_no_error, the object represents a success condition.) Depending\n on how it was constructed, the error may be \"bare\" (_info == NULL) or \"rich\",\n in which case it has an _info struct that can contain additional context and\n information about the error.\n\n The ZL_Error is usually returned-by-value, and therefore the definition\n needs to be publicly available. However, users should not directly interact\n with the members of the struct, and should instead use the various accessors\n and methods made available in the public API."]
765#[repr(C)]
766#[derive(Copy, Clone)]
767pub struct ZL_Error_s {
768    pub _code: ZL_ErrorCode,
769    pub _info: ZL_ErrorInfo,
770}
771#[test]
772fn bindgen_test_layout_ZL_Error_s() {
773    const UNINIT: ::std::mem::MaybeUninit<ZL_Error_s> = ::std::mem::MaybeUninit::uninit();
774    let ptr = UNINIT.as_ptr();
775    assert_eq!(
776        ::std::mem::size_of::<ZL_Error_s>(),
777        16usize,
778        "Size of ZL_Error_s"
779    );
780    assert_eq!(
781        ::std::mem::align_of::<ZL_Error_s>(),
782        8usize,
783        "Alignment of ZL_Error_s"
784    );
785    assert_eq!(
786        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
787        0usize,
788        "Offset of field: ZL_Error_s::_code"
789    );
790    assert_eq!(
791        unsafe { ::std::ptr::addr_of!((*ptr)._info) as usize - ptr as usize },
792        8usize,
793        "Offset of field: ZL_Error_s::_info"
794    );
795}
796extern "C" {
797    #[doc = " Actual implementation function which accepts all of the explicit arguments\n that are set up for you by the macros elsewhere. Prefer to use those macros\n rather than this function directly.\n - `file` arg is intended to be filled with __FILE__ macro.\n - `func` arg is intended to be filled with __func__ macro.\n - `line` arg is intended to be filled with __LINE__ macro."]
798    pub fn ZL_E_create(
799        st: *const ZL_StaticErrorInfo,
800        ctx: *const ZL_ErrorContext,
801        file: *const ::std::os::raw::c_char,
802        func: *const ::std::os::raw::c_char,
803        line: ::std::os::raw::c_int,
804        code: ZL_ErrorCode,
805        fmt: *const ::std::os::raw::c_char,
806        ...
807    ) -> ZL_Error;
808}
809extern "C" {
810    #[doc = " Append a formatted string to the error's message. May be a no-op if the\n error doesn't have a rich error info set up internally."]
811    pub fn ZL_E_appendToMessage(err: ZL_Error, fmt: *const ::std::os::raw::c_char, ...);
812}
813extern "C" {
814    #[doc = " Attempts to add more information to the error represented by @p error.\n Narrowly, this means trying to append a stack frame to the stacktrace that\n rich errors accumulate. In service of that, it also tries to up-convert the\n error to a rich error if it isn't already. @p fmt and optional additional\n following args can also be used to append an arbitrary formatted string of\n information into the error.\n\n This function can be called directly, but is primarily used indirectly.\n Firstly, if you want to invoke this function yourself, it's easier to use\n @ref ZL_E_ADDFRAME_PUBLIC instead since it populates some of the arguments\n for you. Secondly, this is an implementation detail mostly here to be used\n by @ref ZL_RET_T_IF_ERR and friends, which call this to add more context to\n the error as it passes by.\n\n @note OpenZL must have been compiled with ZL_ERROR_ENABLE_STACKS defined to\n       true for this to do anything. (This is the default.)\n\n @returns the modified error."]
815    pub fn ZL_E_addFrame_public(
816        ctx: *const ZL_ErrorContext,
817        error: ZL_Error,
818        file: *const ::std::os::raw::c_char,
819        func: *const ::std::os::raw::c_char,
820        line: ::std::os::raw::c_int,
821        fmt: *const ::std::os::raw::c_char,
822        ...
823    ) -> ZL_Error;
824}
825#[doc = " ZL_Error_Array: a const view into an array of errors, returned by some\n public APIs."]
826#[repr(C)]
827#[derive(Debug, Copy, Clone)]
828pub struct ZL_Error_Array {
829    pub errors: *const ZL_Error,
830    pub size: usize,
831}
832#[test]
833fn bindgen_test_layout_ZL_Error_Array() {
834    const UNINIT: ::std::mem::MaybeUninit<ZL_Error_Array> = ::std::mem::MaybeUninit::uninit();
835    let ptr = UNINIT.as_ptr();
836    assert_eq!(
837        ::std::mem::size_of::<ZL_Error_Array>(),
838        16usize,
839        "Size of ZL_Error_Array"
840    );
841    assert_eq!(
842        ::std::mem::align_of::<ZL_Error_Array>(),
843        8usize,
844        "Alignment of ZL_Error_Array"
845    );
846    assert_eq!(
847        unsafe { ::std::ptr::addr_of!((*ptr).errors) as usize - ptr as usize },
848        0usize,
849        "Offset of field: ZL_Error_Array::errors"
850    );
851    assert_eq!(
852        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
853        8usize,
854        "Offset of field: ZL_Error_Array::size"
855    );
856}
857#[repr(C)]
858#[derive(Debug, Copy, Clone)]
859pub struct ZL_Result_ZL_GraphID_inner {
860    pub _code: ZL_ErrorCode,
861    pub _value: ZL_GraphID,
862}
863#[test]
864fn bindgen_test_layout_ZL_Result_ZL_GraphID_inner() {
865    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_GraphID_inner> =
866        ::std::mem::MaybeUninit::uninit();
867    let ptr = UNINIT.as_ptr();
868    assert_eq!(
869        ::std::mem::size_of::<ZL_Result_ZL_GraphID_inner>(),
870        8usize,
871        "Size of ZL_Result_ZL_GraphID_inner"
872    );
873    assert_eq!(
874        ::std::mem::align_of::<ZL_Result_ZL_GraphID_inner>(),
875        4usize,
876        "Alignment of ZL_Result_ZL_GraphID_inner"
877    );
878    assert_eq!(
879        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
880        0usize,
881        "Offset of field: ZL_Result_ZL_GraphID_inner::_code"
882    );
883    assert_eq!(
884        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
885        4usize,
886        "Offset of field: ZL_Result_ZL_GraphID_inner::_value"
887    );
888}
889#[repr(C)]
890#[derive(Copy, Clone)]
891pub union ZL_Result_ZL_GraphID_u {
892    pub _code: ZL_ErrorCode,
893    pub _value: ZL_Result_ZL_GraphID_inner,
894    pub _error: ZL_Error,
895}
896#[test]
897fn bindgen_test_layout_ZL_Result_ZL_GraphID_u() {
898    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_GraphID_u> =
899        ::std::mem::MaybeUninit::uninit();
900    let ptr = UNINIT.as_ptr();
901    assert_eq!(
902        ::std::mem::size_of::<ZL_Result_ZL_GraphID_u>(),
903        16usize,
904        "Size of ZL_Result_ZL_GraphID_u"
905    );
906    assert_eq!(
907        ::std::mem::align_of::<ZL_Result_ZL_GraphID_u>(),
908        8usize,
909        "Alignment of ZL_Result_ZL_GraphID_u"
910    );
911    assert_eq!(
912        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
913        0usize,
914        "Offset of field: ZL_Result_ZL_GraphID_u::_code"
915    );
916    assert_eq!(
917        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
918        0usize,
919        "Offset of field: ZL_Result_ZL_GraphID_u::_value"
920    );
921    assert_eq!(
922        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
923        0usize,
924        "Offset of field: ZL_Result_ZL_GraphID_u::_error"
925    );
926}
927pub type ZL_Result_ZL_GraphID = ZL_Result_ZL_GraphID_u;
928extern "C" {
929    #[link_name = "ZL_Result_ZL_GraphID_extract__extern"]
930    pub fn ZL_Result_ZL_GraphID_extract(
931        result: ZL_Result_ZL_GraphID,
932        error: *mut ZL_Error,
933    ) -> ZL_GraphID;
934}
935pub type ZL_Result_ZL_GraphID_fake_type_needs_semicolon = ::std::os::raw::c_int;
936#[repr(C)]
937#[derive(Debug, Copy, Clone)]
938pub struct ZL_Result_ZL_NodeID_inner {
939    pub _code: ZL_ErrorCode,
940    pub _value: ZL_NodeID,
941}
942#[test]
943fn bindgen_test_layout_ZL_Result_ZL_NodeID_inner() {
944    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_NodeID_inner> =
945        ::std::mem::MaybeUninit::uninit();
946    let ptr = UNINIT.as_ptr();
947    assert_eq!(
948        ::std::mem::size_of::<ZL_Result_ZL_NodeID_inner>(),
949        8usize,
950        "Size of ZL_Result_ZL_NodeID_inner"
951    );
952    assert_eq!(
953        ::std::mem::align_of::<ZL_Result_ZL_NodeID_inner>(),
954        4usize,
955        "Alignment of ZL_Result_ZL_NodeID_inner"
956    );
957    assert_eq!(
958        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
959        0usize,
960        "Offset of field: ZL_Result_ZL_NodeID_inner::_code"
961    );
962    assert_eq!(
963        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
964        4usize,
965        "Offset of field: ZL_Result_ZL_NodeID_inner::_value"
966    );
967}
968#[repr(C)]
969#[derive(Copy, Clone)]
970pub union ZL_Result_ZL_NodeID_u {
971    pub _code: ZL_ErrorCode,
972    pub _value: ZL_Result_ZL_NodeID_inner,
973    pub _error: ZL_Error,
974}
975#[test]
976fn bindgen_test_layout_ZL_Result_ZL_NodeID_u() {
977    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_NodeID_u> =
978        ::std::mem::MaybeUninit::uninit();
979    let ptr = UNINIT.as_ptr();
980    assert_eq!(
981        ::std::mem::size_of::<ZL_Result_ZL_NodeID_u>(),
982        16usize,
983        "Size of ZL_Result_ZL_NodeID_u"
984    );
985    assert_eq!(
986        ::std::mem::align_of::<ZL_Result_ZL_NodeID_u>(),
987        8usize,
988        "Alignment of ZL_Result_ZL_NodeID_u"
989    );
990    assert_eq!(
991        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
992        0usize,
993        "Offset of field: ZL_Result_ZL_NodeID_u::_code"
994    );
995    assert_eq!(
996        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
997        0usize,
998        "Offset of field: ZL_Result_ZL_NodeID_u::_value"
999    );
1000    assert_eq!(
1001        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
1002        0usize,
1003        "Offset of field: ZL_Result_ZL_NodeID_u::_error"
1004    );
1005}
1006pub type ZL_Result_ZL_NodeID = ZL_Result_ZL_NodeID_u;
1007extern "C" {
1008    #[link_name = "ZL_Result_ZL_NodeID_extract__extern"]
1009    pub fn ZL_Result_ZL_NodeID_extract(
1010        result: ZL_Result_ZL_NodeID,
1011        error: *mut ZL_Error,
1012    ) -> ZL_NodeID;
1013}
1014pub type ZL_Result_ZL_NodeID_fake_type_needs_semicolon = ::std::os::raw::c_int;
1015#[repr(C)]
1016#[derive(Debug, Copy, Clone)]
1017pub struct ZL_Result_size_t_inner {
1018    pub _code: ZL_ErrorCode,
1019    pub _value: usize,
1020}
1021#[test]
1022fn bindgen_test_layout_ZL_Result_size_t_inner() {
1023    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_size_t_inner> =
1024        ::std::mem::MaybeUninit::uninit();
1025    let ptr = UNINIT.as_ptr();
1026    assert_eq!(
1027        ::std::mem::size_of::<ZL_Result_size_t_inner>(),
1028        16usize,
1029        "Size of ZL_Result_size_t_inner"
1030    );
1031    assert_eq!(
1032        ::std::mem::align_of::<ZL_Result_size_t_inner>(),
1033        8usize,
1034        "Alignment of ZL_Result_size_t_inner"
1035    );
1036    assert_eq!(
1037        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
1038        0usize,
1039        "Offset of field: ZL_Result_size_t_inner::_code"
1040    );
1041    assert_eq!(
1042        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
1043        8usize,
1044        "Offset of field: ZL_Result_size_t_inner::_value"
1045    );
1046}
1047#[repr(C)]
1048#[derive(Copy, Clone)]
1049pub union ZL_Result_size_t_u {
1050    pub _code: ZL_ErrorCode,
1051    pub _value: ZL_Result_size_t_inner,
1052    pub _error: ZL_Error,
1053}
1054#[test]
1055fn bindgen_test_layout_ZL_Result_size_t_u() {
1056    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_size_t_u> = ::std::mem::MaybeUninit::uninit();
1057    let ptr = UNINIT.as_ptr();
1058    assert_eq!(
1059        ::std::mem::size_of::<ZL_Result_size_t_u>(),
1060        16usize,
1061        "Size of ZL_Result_size_t_u"
1062    );
1063    assert_eq!(
1064        ::std::mem::align_of::<ZL_Result_size_t_u>(),
1065        8usize,
1066        "Alignment of ZL_Result_size_t_u"
1067    );
1068    assert_eq!(
1069        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
1070        0usize,
1071        "Offset of field: ZL_Result_size_t_u::_code"
1072    );
1073    assert_eq!(
1074        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
1075        0usize,
1076        "Offset of field: ZL_Result_size_t_u::_value"
1077    );
1078    assert_eq!(
1079        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
1080        0usize,
1081        "Offset of field: ZL_Result_size_t_u::_error"
1082    );
1083}
1084pub type ZL_Result_size_t = ZL_Result_size_t_u;
1085extern "C" {
1086    #[link_name = "ZL_Result_size_t_extract__extern"]
1087    pub fn ZL_Result_size_t_extract(result: ZL_Result_size_t, error: *mut ZL_Error) -> usize;
1088}
1089pub type ZL_Result_size_t_fake_type_needs_semicolon = ::std::os::raw::c_int;
1090pub type ZL_Report = ZL_Result_size_t;
1091extern "C" {
1092    #[doc = " @returns true iff the report contains an error"]
1093    #[link_name = "ZL_isError__extern"]
1094    pub fn ZL_isError(report: ZL_Report) -> ::std::os::raw::c_int;
1095}
1096extern "C" {
1097    #[doc = " @pre !ZL_isError(report)\n @returns The value contained within the report"]
1098    #[link_name = "ZL_validResult__extern"]
1099    pub fn ZL_validResult(report: ZL_Report) -> usize;
1100}
1101extern "C" {
1102    #[doc = " @returns The error code contained within the report.\n If !ZL_isError(report), then @returns ZL_ErrorCode_no_error."]
1103    #[link_name = "ZL_errorCode__extern"]
1104    pub fn ZL_errorCode(report: ZL_Report) -> ZL_ErrorCode;
1105}
1106extern "C" {
1107    pub fn ZL_ErrorCode_toString(code: ZL_ErrorCode) -> *const ::std::os::raw::c_char;
1108}
1109extern "C" {
1110    #[doc = " @returns a successful report containing a value."]
1111    #[link_name = "ZL_returnValue__extern"]
1112    pub fn ZL_returnValue(s: usize) -> ZL_Report;
1113}
1114extern "C" {
1115    #[doc = " @returns a successful report without a value (set to zero)."]
1116    #[link_name = "ZL_returnSuccess__extern"]
1117    pub fn ZL_returnSuccess() -> ZL_Report;
1118}
1119extern "C" {
1120    #[doc = " @returns a specific ZL_ErrorCode as a ZL_Report return type."]
1121    pub fn ZL_returnError(err: ZL_ErrorCode) -> ZL_Report;
1122}
1123extern "C" {
1124    pub fn ZL_reportError(
1125        file: *const ::std::os::raw::c_char,
1126        func: *const ::std::os::raw::c_char,
1127        line: ::std::os::raw::c_int,
1128        err: ZL_ErrorCode,
1129        fmt: *const ::std::os::raw::c_char,
1130        ...
1131    ) -> ZL_Report;
1132}
1133pub const ZL_Type_serial: ZL_Type = 1;
1134pub const ZL_Type_struct: ZL_Type = 2;
1135pub const ZL_Type_numeric: ZL_Type = 4;
1136pub const ZL_Type_string: ZL_Type = 8;
1137#[doc = " Any Data object has necessary a Type.\n The least specific Type is `ZL_Type_serial`,\n which means it's just a blob of bytes.\n Codecs can only accept and produce specified data Types.\n In contrast, Selectors & Graphs may optionally accept multiple data Types,\n using bitmap masking (example: `ZL_Type_struct | ZL_Type_numeric`)."]
1138pub type ZL_Type = ::std::os::raw::c_uint;
1139pub const ZL_DataArenaType_heap: ZL_DataArenaType = 0;
1140pub const ZL_DataArenaType_stack: ZL_DataArenaType = 1;
1141pub type ZL_DataArenaType = ::std::os::raw::c_uint;
1142extern "C" {
1143    pub fn ZL_Data_id(in_: *const ZL_Data) -> ZL_DataID;
1144}
1145extern "C" {
1146    pub fn ZL_Data_type(data: *const ZL_Data) -> ZL_Type;
1147}
1148extern "C" {
1149    #[doc = " @note invoking `ZL_Data_numElts()` is only valid for committed Data.\n If the Data object was received as an input, it's necessarily valid.\n So the issue can only happen for outputs,\n between allocation and commit.\n Querying `ZL_Data_numElts()` is not expected to be useful for output Data.\n @note `ZL_Type_serial` doesn't really have a concept of \"elt\".\n In this case, it returns Data size in bytes."]
1150    pub fn ZL_Data_numElts(data: *const ZL_Data) -> usize;
1151}
1152extern "C" {
1153    #[doc = " @return element width in nb of bytes\n This is only valid for fixed size elements,\n such as `ZL_Type_struct` or `ZL_Type_numeric`.\n If Type is `ZL_Type_string`, it returns 0 instead."]
1154    pub fn ZL_Data_eltWidth(data: *const ZL_Data) -> usize;
1155}
1156extern "C" {
1157    #[doc = " @return the nb of bytes committed into data's buffer\n (generally `== data->eltWidth * data->nbElts`).\n\n For `ZL_Type_string`, result is equal to `sum(data->stringLens)`.\n Returned value is provided in nb of bytes.\n\n @note invoking this symbol only makes sense if Data was\n previously committed.\n @note (@cyan): ZS2_Data_byteSize() is another name candidate."]
1158    pub fn ZL_Data_contentSize(data: *const ZL_Data) -> usize;
1159}
1160extern "C" {
1161    #[doc = " These methods provide direct access to internal buffer.\n Warning : users must pay attention to buffer boundaries.\n @return pointer to the _beginning_ of buffer.\n @note for `ZL_Type_string`, returns a pointer to the buffer containing the\n concatenated strings."]
1162    pub fn ZL_Data_rPtr(data: *const ZL_Data) -> *const ::std::os::raw::c_void;
1163}
1164extern "C" {
1165    pub fn ZL_Data_wPtr(data: *mut ZL_Data) -> *mut ::std::os::raw::c_void;
1166}
1167extern "C" {
1168    #[doc = " This method is only valid for `ZL_Type_string` Data.\n @return a pointer to the array of string lengths.\n The size of this array is `== ZL_Data_numElts(data)`.\n @return `NULL` if incorrect data type, or `StringLens` not allocated yet."]
1169    pub fn ZL_Data_rStringLens(data: *const ZL_Data) -> *const u32;
1170}
1171extern "C" {
1172    #[doc = " This method is only valid for `ZL_Type_string` Data.\n It requires write access into StringLens array.\n Only valid if StringLens array has already been allocated\n and not yet written into.\n @return NULL when any of the above conditions is violated.\n\n Array's capacity is supposed known from reservation request.\n After writing into the array, the nb of Strings, which is also\n the nb of String Lengths written, must be provided using\n ZL_Data_commit()."]
1173    pub fn ZL_Data_wStringLens(data: *mut ZL_Data) -> *mut u32;
1174}
1175extern "C" {
1176    #[doc = " This method is only valid for `ZL_Type_string` Data.\n It reserves memory space for StringLens array, and returns a pointer to it.\n The buffer is owned by @p data and has the same lifetime.\n The returned pointer can be used to write into the array.\n After writing into the array, the nb of String Lengths provided must be\n signaled using @ref ZL_Data_commit().\n This method will fail if StringLens is already allocated.\n @return `NULL` if incorrect data type, or allocation error."]
1177    pub fn ZL_Data_reserveStringLens(data: *mut ZL_Data, nbStrings: usize) -> *mut u32;
1178}
1179extern "C" {
1180    #[doc = " @brief Commit the number of elements written into @p data.\n\n This method must be called exactly once for every output.\n The @p nbElts must be `<=` reserved capacity of @p data.\n Note that, for `ZL_Type_string`, this is the number of strings written into\n@p data.\n The operation will automatically determine the total size of all Strings\nwithin @p data.\n\n @returns Success or an error. This function will fail if it is called more\n than once on the same @p data, or if @p nbElts is greater than @p data's\n capacity.\n\n Terminating a Codec _without_ committing anything to @p data (not even `0`)\n is considered an error, that is caught by the Engine\n (classified as node processing error).\n\n @note @p nbElts, as \"number of elements\", is **not** the same as size in\nbytes written in\n the buffer. For Numerics and Structs, the translation is\n straighforward. For Strings, the field sizes array must be\n provided first, using `ZL_Data_reserveStringLens()` to create\n and access the array. The resulting useful content size will then\n be calculated from the sum of field sizes. It will be controlled,\n and there will be an error if sum(sizes) > bufferCapacity."]
1181    pub fn ZL_Data_commit(data: *mut ZL_Data, nbElts: usize) -> ZL_Report;
1182}
1183extern "C" {
1184    #[doc = " @brief Sets integer metadata with the key @p mId and value @p mvalue on the\n stream.\n\n It is only valid to call ZL_Data_setIntMetadata() with the same @p mId\n once. Subsequent calls with the same @p mId will return an error.\n\n @param mId Metdata key\n @param mvalue Metadata value\n\n @returns Success or an error. This function will fail due to repeated calls\n with the same @p mId, or upon running out of space for the metadata.\n\n @note In this proposed design, Int Metadata are set one by one.\n Another possible design could follow the IntParams\n model, where all parameters must be set all-at-once, and be\n provided as a single vector of IntParams structures.\n\n @note The set value is an int, hence it's not suitable to store \"large\"\n values, like 64-bit ULL."]
1185    pub fn ZL_Data_setIntMetadata(
1186        s: *mut ZL_Data,
1187        mId: ::std::os::raw::c_int,
1188        mvalue: ::std::os::raw::c_int,
1189    ) -> ZL_Report;
1190}
1191#[repr(C)]
1192#[derive(Debug, Copy, Clone)]
1193pub struct ZL_IntMetadata {
1194    pub isPresent: ::std::os::raw::c_int,
1195    pub mValue: ::std::os::raw::c_int,
1196}
1197#[test]
1198fn bindgen_test_layout_ZL_IntMetadata() {
1199    const UNINIT: ::std::mem::MaybeUninit<ZL_IntMetadata> = ::std::mem::MaybeUninit::uninit();
1200    let ptr = UNINIT.as_ptr();
1201    assert_eq!(
1202        ::std::mem::size_of::<ZL_IntMetadata>(),
1203        8usize,
1204        "Size of ZL_IntMetadata"
1205    );
1206    assert_eq!(
1207        ::std::mem::align_of::<ZL_IntMetadata>(),
1208        4usize,
1209        "Alignment of ZL_IntMetadata"
1210    );
1211    assert_eq!(
1212        unsafe { ::std::ptr::addr_of!((*ptr).isPresent) as usize - ptr as usize },
1213        0usize,
1214        "Offset of field: ZL_IntMetadata::isPresent"
1215    );
1216    assert_eq!(
1217        unsafe { ::std::ptr::addr_of!((*ptr).mValue) as usize - ptr as usize },
1218        4usize,
1219        "Offset of field: ZL_IntMetadata::mValue"
1220    );
1221}
1222extern "C" {
1223    pub fn ZL_Data_getIntMetadata(s: *const ZL_Data, mId: ::std::os::raw::c_int) -> ZL_IntMetadata;
1224}
1225#[repr(C)]
1226#[derive(Debug, Copy, Clone)]
1227pub struct ZL_IntParam {
1228    pub paramId: ::std::os::raw::c_int,
1229    pub paramValue: ::std::os::raw::c_int,
1230}
1231#[test]
1232fn bindgen_test_layout_ZL_IntParam() {
1233    const UNINIT: ::std::mem::MaybeUninit<ZL_IntParam> = ::std::mem::MaybeUninit::uninit();
1234    let ptr = UNINIT.as_ptr();
1235    assert_eq!(
1236        ::std::mem::size_of::<ZL_IntParam>(),
1237        8usize,
1238        "Size of ZL_IntParam"
1239    );
1240    assert_eq!(
1241        ::std::mem::align_of::<ZL_IntParam>(),
1242        4usize,
1243        "Alignment of ZL_IntParam"
1244    );
1245    assert_eq!(
1246        unsafe { ::std::ptr::addr_of!((*ptr).paramId) as usize - ptr as usize },
1247        0usize,
1248        "Offset of field: ZL_IntParam::paramId"
1249    );
1250    assert_eq!(
1251        unsafe { ::std::ptr::addr_of!((*ptr).paramValue) as usize - ptr as usize },
1252        4usize,
1253        "Offset of field: ZL_IntParam::paramValue"
1254    );
1255}
1256#[repr(C)]
1257#[derive(Debug, Copy, Clone)]
1258pub struct ZL_LocalIntParams {
1259    pub intParams: *const ZL_IntParam,
1260    pub nbIntParams: usize,
1261}
1262#[test]
1263fn bindgen_test_layout_ZL_LocalIntParams() {
1264    const UNINIT: ::std::mem::MaybeUninit<ZL_LocalIntParams> = ::std::mem::MaybeUninit::uninit();
1265    let ptr = UNINIT.as_ptr();
1266    assert_eq!(
1267        ::std::mem::size_of::<ZL_LocalIntParams>(),
1268        16usize,
1269        "Size of ZL_LocalIntParams"
1270    );
1271    assert_eq!(
1272        ::std::mem::align_of::<ZL_LocalIntParams>(),
1273        8usize,
1274        "Alignment of ZL_LocalIntParams"
1275    );
1276    assert_eq!(
1277        unsafe { ::std::ptr::addr_of!((*ptr).intParams) as usize - ptr as usize },
1278        0usize,
1279        "Offset of field: ZL_LocalIntParams::intParams"
1280    );
1281    assert_eq!(
1282        unsafe { ::std::ptr::addr_of!((*ptr).nbIntParams) as usize - ptr as usize },
1283        8usize,
1284        "Offset of field: ZL_LocalIntParams::nbIntParams"
1285    );
1286}
1287#[repr(C)]
1288#[derive(Debug, Copy, Clone)]
1289pub struct ZL_CopyParam {
1290    pub paramId: ::std::os::raw::c_int,
1291    pub paramPtr: *const ::std::os::raw::c_void,
1292    pub paramSize: usize,
1293}
1294#[test]
1295fn bindgen_test_layout_ZL_CopyParam() {
1296    const UNINIT: ::std::mem::MaybeUninit<ZL_CopyParam> = ::std::mem::MaybeUninit::uninit();
1297    let ptr = UNINIT.as_ptr();
1298    assert_eq!(
1299        ::std::mem::size_of::<ZL_CopyParam>(),
1300        24usize,
1301        "Size of ZL_CopyParam"
1302    );
1303    assert_eq!(
1304        ::std::mem::align_of::<ZL_CopyParam>(),
1305        8usize,
1306        "Alignment of ZL_CopyParam"
1307    );
1308    assert_eq!(
1309        unsafe { ::std::ptr::addr_of!((*ptr).paramId) as usize - ptr as usize },
1310        0usize,
1311        "Offset of field: ZL_CopyParam::paramId"
1312    );
1313    assert_eq!(
1314        unsafe { ::std::ptr::addr_of!((*ptr).paramPtr) as usize - ptr as usize },
1315        8usize,
1316        "Offset of field: ZL_CopyParam::paramPtr"
1317    );
1318    assert_eq!(
1319        unsafe { ::std::ptr::addr_of!((*ptr).paramSize) as usize - ptr as usize },
1320        16usize,
1321        "Offset of field: ZL_CopyParam::paramSize"
1322    );
1323}
1324#[repr(C)]
1325#[derive(Debug, Copy, Clone)]
1326pub struct ZL_LocalCopyParams {
1327    pub copyParams: *const ZL_CopyParam,
1328    pub nbCopyParams: usize,
1329}
1330#[test]
1331fn bindgen_test_layout_ZL_LocalCopyParams() {
1332    const UNINIT: ::std::mem::MaybeUninit<ZL_LocalCopyParams> = ::std::mem::MaybeUninit::uninit();
1333    let ptr = UNINIT.as_ptr();
1334    assert_eq!(
1335        ::std::mem::size_of::<ZL_LocalCopyParams>(),
1336        16usize,
1337        "Size of ZL_LocalCopyParams"
1338    );
1339    assert_eq!(
1340        ::std::mem::align_of::<ZL_LocalCopyParams>(),
1341        8usize,
1342        "Alignment of ZL_LocalCopyParams"
1343    );
1344    assert_eq!(
1345        unsafe { ::std::ptr::addr_of!((*ptr).copyParams) as usize - ptr as usize },
1346        0usize,
1347        "Offset of field: ZL_LocalCopyParams::copyParams"
1348    );
1349    assert_eq!(
1350        unsafe { ::std::ptr::addr_of!((*ptr).nbCopyParams) as usize - ptr as usize },
1351        8usize,
1352        "Offset of field: ZL_LocalCopyParams::nbCopyParams"
1353    );
1354}
1355#[repr(C)]
1356#[derive(Debug, Copy, Clone)]
1357pub struct ZL_RefParam {
1358    pub paramId: ::std::os::raw::c_int,
1359    pub paramRef: *const ::std::os::raw::c_void,
1360    #[doc = " Optionally the size of the referenced object.\n OpenZL does not interpret this value. A common pattern is to use the\n value 0 to mean unknown size."]
1361    pub paramSize: usize,
1362}
1363#[test]
1364fn bindgen_test_layout_ZL_RefParam() {
1365    const UNINIT: ::std::mem::MaybeUninit<ZL_RefParam> = ::std::mem::MaybeUninit::uninit();
1366    let ptr = UNINIT.as_ptr();
1367    assert_eq!(
1368        ::std::mem::size_of::<ZL_RefParam>(),
1369        24usize,
1370        "Size of ZL_RefParam"
1371    );
1372    assert_eq!(
1373        ::std::mem::align_of::<ZL_RefParam>(),
1374        8usize,
1375        "Alignment of ZL_RefParam"
1376    );
1377    assert_eq!(
1378        unsafe { ::std::ptr::addr_of!((*ptr).paramId) as usize - ptr as usize },
1379        0usize,
1380        "Offset of field: ZL_RefParam::paramId"
1381    );
1382    assert_eq!(
1383        unsafe { ::std::ptr::addr_of!((*ptr).paramRef) as usize - ptr as usize },
1384        8usize,
1385        "Offset of field: ZL_RefParam::paramRef"
1386    );
1387    assert_eq!(
1388        unsafe { ::std::ptr::addr_of!((*ptr).paramSize) as usize - ptr as usize },
1389        16usize,
1390        "Offset of field: ZL_RefParam::paramSize"
1391    );
1392}
1393#[repr(C)]
1394#[derive(Debug, Copy, Clone)]
1395pub struct ZL_LocalRefParams {
1396    pub refParams: *const ZL_RefParam,
1397    pub nbRefParams: usize,
1398}
1399#[test]
1400fn bindgen_test_layout_ZL_LocalRefParams() {
1401    const UNINIT: ::std::mem::MaybeUninit<ZL_LocalRefParams> = ::std::mem::MaybeUninit::uninit();
1402    let ptr = UNINIT.as_ptr();
1403    assert_eq!(
1404        ::std::mem::size_of::<ZL_LocalRefParams>(),
1405        16usize,
1406        "Size of ZL_LocalRefParams"
1407    );
1408    assert_eq!(
1409        ::std::mem::align_of::<ZL_LocalRefParams>(),
1410        8usize,
1411        "Alignment of ZL_LocalRefParams"
1412    );
1413    assert_eq!(
1414        unsafe { ::std::ptr::addr_of!((*ptr).refParams) as usize - ptr as usize },
1415        0usize,
1416        "Offset of field: ZL_LocalRefParams::refParams"
1417    );
1418    assert_eq!(
1419        unsafe { ::std::ptr::addr_of!((*ptr).nbRefParams) as usize - ptr as usize },
1420        8usize,
1421        "Offset of field: ZL_LocalRefParams::nbRefParams"
1422    );
1423}
1424#[repr(C)]
1425#[derive(Debug, Copy, Clone)]
1426pub struct ZL_LocalParams {
1427    pub intParams: ZL_LocalIntParams,
1428    pub copyParams: ZL_LocalCopyParams,
1429    pub refParams: ZL_LocalRefParams,
1430}
1431#[test]
1432fn bindgen_test_layout_ZL_LocalParams() {
1433    const UNINIT: ::std::mem::MaybeUninit<ZL_LocalParams> = ::std::mem::MaybeUninit::uninit();
1434    let ptr = UNINIT.as_ptr();
1435    assert_eq!(
1436        ::std::mem::size_of::<ZL_LocalParams>(),
1437        48usize,
1438        "Size of ZL_LocalParams"
1439    );
1440    assert_eq!(
1441        ::std::mem::align_of::<ZL_LocalParams>(),
1442        8usize,
1443        "Alignment of ZL_LocalParams"
1444    );
1445    assert_eq!(
1446        unsafe { ::std::ptr::addr_of!((*ptr).intParams) as usize - ptr as usize },
1447        0usize,
1448        "Offset of field: ZL_LocalParams::intParams"
1449    );
1450    assert_eq!(
1451        unsafe { ::std::ptr::addr_of!((*ptr).copyParams) as usize - ptr as usize },
1452        16usize,
1453        "Offset of field: ZL_LocalParams::copyParams"
1454    );
1455    assert_eq!(
1456        unsafe { ::std::ptr::addr_of!((*ptr).refParams) as usize - ptr as usize },
1457        32usize,
1458        "Offset of field: ZL_LocalParams::refParams"
1459    );
1460}
1461#[repr(C)]
1462#[derive(Debug, Copy, Clone)]
1463pub struct ZL_CompressIntrospectionHooks_s {
1464    pub opaque: *mut ::std::os::raw::c_void,
1465    pub on_ZL_Encoder_getScratchSpace: ::std::option::Option<
1466        unsafe extern "C" fn(opaque: *mut ::std::os::raw::c_void, ei: *mut ZL_Encoder, size: usize),
1467    >,
1468    pub on_ZL_Encoder_sendCodecHeader: ::std::option::Option<
1469        unsafe extern "C" fn(
1470            opaque: *mut ::std::os::raw::c_void,
1471            eictx: *mut ZL_Encoder,
1472            trh: *const ::std::os::raw::c_void,
1473            trhSize: usize,
1474        ),
1475    >,
1476    pub on_ZL_Encoder_createTypedStream: ::std::option::Option<
1477        unsafe extern "C" fn(
1478            opaque: *mut ::std::os::raw::c_void,
1479            eic: *mut ZL_Encoder,
1480            outStreamIndex: ::std::os::raw::c_int,
1481            eltsCapacity: usize,
1482            eltWidth: usize,
1483            createdStream: *mut ZL_Output,
1484        ),
1485    >,
1486    pub on_ZL_Graph_getScratchSpace: ::std::option::Option<
1487        unsafe extern "C" fn(opaque: *mut ::std::os::raw::c_void, gctx: *mut ZL_Graph, size: usize),
1488    >,
1489    pub on_ZL_Edge_setMultiInputDestination_wParams: ::std::option::Option<
1490        unsafe extern "C" fn(
1491            opaque: *mut ::std::os::raw::c_void,
1492            gctx: *mut ZL_Graph,
1493            inputs: *mut *mut ZL_Edge,
1494            nbInputs: usize,
1495            gid: ZL_GraphID,
1496            lparams: *const ZL_LocalParams,
1497        ),
1498    >,
1499    pub on_migraphEncode_start: ::std::option::Option<
1500        unsafe extern "C" fn(
1501            opaque: *mut ::std::os::raw::c_void,
1502            gctx: *mut ZL_Graph,
1503            compressor: *const ZL_Compressor,
1504            gid: ZL_GraphID,
1505            inputs: *mut *mut ZL_Edge,
1506            nbInputs: usize,
1507        ),
1508    >,
1509    pub on_migraphEncode_end: ::std::option::Option<
1510        unsafe extern "C" fn(
1511            opaque: *mut ::std::os::raw::c_void,
1512            arg1: *mut ZL_Graph,
1513            successorGraphs: *mut ZL_GraphID,
1514            nbSuccessors: usize,
1515            graphExecResult: ZL_Report,
1516        ),
1517    >,
1518    pub on_codecEncode_start: ::std::option::Option<
1519        unsafe extern "C" fn(
1520            opaque: *mut ::std::os::raw::c_void,
1521            eictx: *mut ZL_Encoder,
1522            compressor: *const ZL_Compressor,
1523            nid: ZL_NodeID,
1524            inStreams: *mut *const ZL_Input,
1525            nbInStreams: usize,
1526        ),
1527    >,
1528    pub on_codecEncode_end: ::std::option::Option<
1529        unsafe extern "C" fn(
1530            opaque: *mut ::std::os::raw::c_void,
1531            arg1: *mut ZL_Encoder,
1532            outStreams: *mut *const ZL_Output,
1533            nbOutputs: usize,
1534            codecExecResult: ZL_Report,
1535        ),
1536    >,
1537    pub on_cctx_convertOneInput: ::std::option::Option<
1538        unsafe extern "C" fn(
1539            opque: *mut ::std::os::raw::c_void,
1540            cctx: *const ZL_CCtx,
1541            input: *const ZL_Data,
1542            inType: ZL_Type,
1543            portTypeMask: ZL_Type,
1544            conversionResult: ZL_Report,
1545        ),
1546    >,
1547    pub on_ZL_CCtx_compressMultiTypedRef_start: ::std::option::Option<
1548        unsafe extern "C" fn(
1549            opaque: *mut ::std::os::raw::c_void,
1550            cctx: *const ZL_CCtx,
1551            dst: *const ::std::os::raw::c_void,
1552            dstCapacity: usize,
1553            inputs: *const *const ZL_TypedRef,
1554            nbInputs: usize,
1555        ),
1556    >,
1557    pub on_ZL_CCtx_compressMultiTypedRef_end: ::std::option::Option<
1558        unsafe extern "C" fn(
1559            opaque: *mut ::std::os::raw::c_void,
1560            cctx: *const ZL_CCtx,
1561            result: ZL_Report,
1562        ),
1563    >,
1564}
1565#[test]
1566fn bindgen_test_layout_ZL_CompressIntrospectionHooks_s() {
1567    const UNINIT: ::std::mem::MaybeUninit<ZL_CompressIntrospectionHooks_s> =
1568        ::std::mem::MaybeUninit::uninit();
1569    let ptr = UNINIT.as_ptr();
1570    assert_eq!(
1571        ::std::mem::size_of::<ZL_CompressIntrospectionHooks_s>(),
1572        104usize,
1573        "Size of ZL_CompressIntrospectionHooks_s"
1574    );
1575    assert_eq!(
1576        ::std::mem::align_of::<ZL_CompressIntrospectionHooks_s>(),
1577        8usize,
1578        "Alignment of ZL_CompressIntrospectionHooks_s"
1579    );
1580    assert_eq!(
1581        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
1582        0usize,
1583        "Offset of field: ZL_CompressIntrospectionHooks_s::opaque"
1584    );
1585    assert_eq!(
1586        unsafe {
1587            ::std::ptr::addr_of!((*ptr).on_ZL_Encoder_getScratchSpace) as usize - ptr as usize
1588        },
1589        8usize,
1590        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Encoder_getScratchSpace"
1591    );
1592    assert_eq!(
1593        unsafe {
1594            ::std::ptr::addr_of!((*ptr).on_ZL_Encoder_sendCodecHeader) as usize - ptr as usize
1595        },
1596        16usize,
1597        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Encoder_sendCodecHeader"
1598    );
1599    assert_eq!(
1600        unsafe {
1601            ::std::ptr::addr_of!((*ptr).on_ZL_Encoder_createTypedStream) as usize - ptr as usize
1602        },
1603        24usize,
1604        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Encoder_createTypedStream"
1605    );
1606    assert_eq!(
1607        unsafe { ::std::ptr::addr_of!((*ptr).on_ZL_Graph_getScratchSpace) as usize - ptr as usize },
1608        32usize,
1609        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Graph_getScratchSpace"
1610    );
1611    assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . on_ZL_Edge_setMultiInputDestination_wParams) as usize - ptr as usize } , 40usize , "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Edge_setMultiInputDestination_wParams");
1612    assert_eq!(
1613        unsafe { ::std::ptr::addr_of!((*ptr).on_migraphEncode_start) as usize - ptr as usize },
1614        48usize,
1615        "Offset of field: ZL_CompressIntrospectionHooks_s::on_migraphEncode_start"
1616    );
1617    assert_eq!(
1618        unsafe { ::std::ptr::addr_of!((*ptr).on_migraphEncode_end) as usize - ptr as usize },
1619        56usize,
1620        "Offset of field: ZL_CompressIntrospectionHooks_s::on_migraphEncode_end"
1621    );
1622    assert_eq!(
1623        unsafe { ::std::ptr::addr_of!((*ptr).on_codecEncode_start) as usize - ptr as usize },
1624        64usize,
1625        "Offset of field: ZL_CompressIntrospectionHooks_s::on_codecEncode_start"
1626    );
1627    assert_eq!(
1628        unsafe { ::std::ptr::addr_of!((*ptr).on_codecEncode_end) as usize - ptr as usize },
1629        72usize,
1630        "Offset of field: ZL_CompressIntrospectionHooks_s::on_codecEncode_end"
1631    );
1632    assert_eq!(
1633        unsafe { ::std::ptr::addr_of!((*ptr).on_cctx_convertOneInput) as usize - ptr as usize },
1634        80usize,
1635        "Offset of field: ZL_CompressIntrospectionHooks_s::on_cctx_convertOneInput"
1636    );
1637    assert_eq!(
1638        unsafe {
1639            ::std::ptr::addr_of!((*ptr).on_ZL_CCtx_compressMultiTypedRef_start) as usize
1640                - ptr as usize
1641        },
1642        88usize,
1643        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_CCtx_compressMultiTypedRef_start"
1644    );
1645    assert_eq!(
1646        unsafe {
1647            ::std::ptr::addr_of!((*ptr).on_ZL_CCtx_compressMultiTypedRef_end) as usize
1648                - ptr as usize
1649        },
1650        96usize,
1651        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_CCtx_compressMultiTypedRef_end"
1652    );
1653}
1654pub type ZL_CompressIntrospectionHooks = ZL_CompressIntrospectionHooks_s;
1655extern "C" {
1656    #[doc = " @returns The current encoding version number.\n This version number is used when the version\n number is unset.\n\n To use a fixed version number for encoding,\n grab the current version number using this\n function, and then pass it as a constant to\n ZL_CParam_formatVersion.\n\n NOTE: We currently only offer the ability to\n encode with older versions for a very limited\n period, so a new release will eventually\n remove support for encoding with any fixed\n version number. If you need long term\n support for a version, please reach out to\n the data_compression team, since that isn't\n currently supported."]
1657    pub fn ZL_getDefaultEncodingVersion() -> ::std::os::raw::c_uint;
1658}
1659extern "C" {
1660    #[doc = " Reads the magic number from the frame and returns the\n format version.\n\n @returns The format version of the frame, or an error\n if the frame isn't large enough, or it has the wrong\n magic number, or if the format version is not supported."]
1661    pub fn ZL_getFormatVersionFromFrame(
1662        src: *const ::std::os::raw::c_void,
1663        srcSize: usize,
1664    ) -> ZL_Report;
1665}
1666extern "C" {
1667    #[doc = " Provides the upper bound for the compressed size needed to ensure\n that compressing @p totalSrcSize is successful. When compressing\n multiple inputs, @p totalSrcSize must be the sum of the size of each input.\n\n @param totalSrcSize The sum of all input sizes\n @returns The upper bound of the compressed size\n\n @note This is a very large over-estimation, to be tightened later"]
1668    #[link_name = "ZL_compressBound__extern"]
1669    pub fn ZL_compressBound(totalSrcSize: usize) -> usize;
1670}
1671extern "C" {
1672    pub fn ZL_CCtx_create() -> *mut ZL_CCtx;
1673}
1674extern "C" {
1675    pub fn ZL_CCtx_free(cctx: *mut ZL_CCtx);
1676}
1677#[doc = " Only meaningful at CCtx level (ignored at CGraph level)\n By default, parameters are reset between compression sessions\n setting this parameter to 1 keep the parameters across compression\n sessions."]
1678pub const ZL_CParam_stickyParameters: ZL_CParam = 1;
1679#[doc = " Scale amplitude to determine"]
1680pub const ZL_CParam_compressionLevel: ZL_CParam = 2;
1681#[doc = " Scale amplitude to determine"]
1682pub const ZL_CParam_decompressionLevel: ZL_CParam = 3;
1683#[doc = " Sets the format version number to use for encoding.\n See @ZL_getDefaultEncodingVersion for details.\n @default 0 means use format version ZL_getDefaultEncodingVersion()."]
1684pub const ZL_CParam_formatVersion: ZL_CParam = 4;
1685#[doc = " Select behavior when an internal compression stage fails.\n For example, when expecting an array of 32-bit integers,\n but the input size is not a clean multiple of 4.\n Strict mode stops at such stage and outputs an error.\n Permissive mode engages a generic backup compression mechanism,\n to successfully complete compression, at the cost of efficiency.\n At the time of this writing, backup is ZL_GRAPH_COMPRESS_GENERIC.\n Valid values for this parameter use the ZS2_cv3_* format.\n @default 0 currently means strict mode. This may change in the\n future."]
1686pub const ZL_CParam_permissiveCompression: ZL_CParam = 5;
1687#[doc = " Enable checksum of the compressed frame.\n This is useful to check for corruption that happens after\n compression.\n Valid values for this parameter use the ZS2_cv3_* format.\n @default 0 currently means checksum, might change in the future."]
1688pub const ZL_CParam_compressedChecksum: ZL_CParam = 6;
1689#[doc = " Enable checksum of the uncompressed content contained in the frame.\n This is useful to check for corruption that happens after\n compression,\n or corruption introduced during (de)compression. However, it cannot\n distinguish the two alone. In order to determine whether it is\n corruption or a bug in the ZStrong library, you have to enable both\n compressed and content checksums.\n Valid values for this parameter use the ZS2_cv3_* format.\n @default 0 currently means checksum, might change in the future."]
1690pub const ZL_CParam_contentChecksum: ZL_CParam = 7;
1691#[doc = " Any time an internal data Stream becomes smaller than this size,\n it gets STORED immediately, without further processing.\n This reduces processing time, improves decompression speed, and\n reduce\n risks of data expansion.\n Note(@Cyan): follows convention that setting 0 means \"default\", aka\n ZL_MINSTREAMSIZE_DEFAULT.\n Therefore, in order to completely disable the \"automatic store\"\n feature,\n one must pass a negative threshold value."]
1692pub const ZL_CParam_minStreamSize: ZL_CParam = 11;
1693#[doc = " The list of global compression parameters"]
1694pub type ZL_CParam = ::std::os::raw::c_uint;
1695extern "C" {
1696    #[doc = " @brief Sets a global compression parameter via the CCtx.\n\n @param gcparam The global compression parameter to set\n @param value The value to set the global compression parameter to\n @returns A ZL_Report containing the result of the operation\n\n @note Parameters set via CCtx have higher priority than parameters set via\n CGraph.\n @note By default, parameters set via CCtx are reset at the end of the\n compression session. To preserve them across sessions, set\n stickyParameters=1."]
1697    pub fn ZL_CCtx_setParameter(
1698        cctx: *mut ZL_CCtx,
1699        gcparam: ZL_CParam,
1700        value: ::std::os::raw::c_int,
1701    ) -> ZL_Report;
1702}
1703extern "C" {
1704    #[doc = " @brief Reads a compression parameter's configured value from the CCtx.\n\n @param gcparam The global compression parameter to read\n @returns The value set for the given parameter (0 if unset or does not\n exist)"]
1705    pub fn ZL_CCtx_getParameter(cctx: *const ZL_CCtx, gcparam: ZL_CParam) -> ::std::os::raw::c_int;
1706}
1707extern "C" {
1708    #[doc = " @brief Resets the parameters in the cctx to a blank state.\n\n @note Useful when unsure if ZL_CParam_stickyParameters is set to 1."]
1709    pub fn ZL_CCtx_resetParameters(cctx: *mut ZL_CCtx) -> ZL_Report;
1710}
1711extern "C" {
1712    #[doc = " Sets the Arena for Data* objects in the CCtx.\n This frees the previous Data Arena and creates a new one.\n This choice remains sticky, until set again.\n The default Data Arena is HeapArena.\n\n @param sat The Data Arena type to set\n\n @note This is an advanced (experimental) parameter."]
1713    pub fn ZL_CCtx_setDataArena(cctx: *mut ZL_CCtx, sat: ZL_DataArenaType) -> ZL_Report;
1714}
1715extern "C" {
1716    #[doc = " @brief A one-shot (blocking) compression function.\n\n @param dst The destination buffer to write the compressed data to\n @param dstCapacity The capacity of the destination buffer\n @param src The source buffer to compress\n @param srcSize The size of the source buffer\n\n @returns The number of bytes written into @p dst, if successful. Otherwise,\n returns an error."]
1717    pub fn ZL_CCtx_compress(
1718        cctx: *mut ZL_CCtx,
1719        dst: *mut ::std::os::raw::c_void,
1720        dstCapacity: usize,
1721        src: *const ::std::os::raw::c_void,
1722        srcSize: usize,
1723    ) -> ZL_Report;
1724}
1725extern "C" {
1726    #[doc = " Gets the error context for a given ZL_Report. This context is useful for\n debugging and for submitting bug reports to Zstrong developers.\n\n @param report The report to get the error context for\n\n @returns A verbose error string containing context about the error that\n occurred.\n\n @note: This string is stored within the @p cctx and is only valid for the\n lifetime of the @p cctx."]
1727    pub fn ZL_CCtx_getErrorContextString(
1728        cctx: *const ZL_CCtx,
1729        report: ZL_Report,
1730    ) -> *const ::std::os::raw::c_char;
1731}
1732extern "C" {
1733    #[doc = " See ZL_CCtx_getErrorContextString()\n\n @param error: The error to get the context for"]
1734    pub fn ZL_CCtx_getErrorContextString_fromError(
1735        cctx: *const ZL_CCtx,
1736        error: ZL_Error,
1737    ) -> *const ::std::os::raw::c_char;
1738}
1739extern "C" {
1740    #[doc = " Gets the warnings that were encountered during the lifetime of the\n most recent compression operation.\n\n @returns The array of warnings encountered\n\n @note The array's and the errors' lifetimes are valid until the next\n compression operation."]
1741    pub fn ZL_CCtx_getWarnings(cctx: *const ZL_CCtx) -> ZL_Error_Array;
1742}
1743extern "C" {
1744    #[doc = " @brief Attach introspection hooks to the CCtx.\n\n The supplied functions in @p hooks will be called at specified waypoints\n during compression. These functions are expected to be pure observer\n functions only. Attempts to modify the intermediate structures exposed at\n these waypoints will almost certainly cause data corruption!\n\n @note This copies the content of the hooks struct into the CCtx. The caller\n is responsible for maintaining the lifetime of the objects in the hook.\n\n @note This will only do something if the library is compiled with the\n ALLOW_INTROSPECTION option. Otherwise, all the hooks will be no-ops."]
1745    pub fn ZL_CCtx_attachIntrospectionHooks(
1746        cctx: *mut ZL_CCtx,
1747        hooks: *const ZL_CompressIntrospectionHooks,
1748    ) -> ZL_Report;
1749}
1750extern "C" {
1751    #[doc = " Detach any introspection hooks currently attached to the CCtx."]
1752    pub fn ZL_CCtx_detachAllIntrospectionHooks(cctx: *mut ZL_CCtx) -> ZL_Report;
1753}
1754extern "C" {
1755    #[doc = " Compresses a single typed input presented as a\n `ZL_TypedRef`. See below for TypedRef* object creation.\n\n @param dst The destination buffer to write the compressed data to\n @param dstCapacity The capacity of the destination buffer\n @param input: The input to compress\n\n @returns The number of bytes written into @p dst, if successful. Otherwise,\n returns an error."]
1756    pub fn ZL_CCtx_compressTypedRef(
1757        cctx: *mut ZL_CCtx,
1758        dst: *mut ::std::os::raw::c_void,
1759        dstCapacity: usize,
1760        input: *const ZL_TypedRef,
1761    ) -> ZL_Report;
1762}
1763extern "C" {
1764    #[doc = " Compresses multiple typed inputs , presented as an\n array of `ZL_TypedRef`. See below for TypedRef* object creation.\n\n @param dst The destination buffer to write the compressed data to\n @param dstCapacity The capacity of the destination buffer\n @param inputs: The inputs to compress\n @param nbInputs: The number of inputs to compress\n\n @returns The number of bytes written into @p dst, if successful. Otherwise,\n returns an error.\n\n @note These inputs will be regenerated together in the same order at\n decompression time."]
1765    pub fn ZL_CCtx_compressMultiTypedRef(
1766        cctx: *mut ZL_CCtx,
1767        dst: *mut ::std::os::raw::c_void,
1768        dstCapacity: usize,
1769        inputs: *mut *const ZL_TypedRef,
1770        nbInputs: usize,
1771    ) -> ZL_Report;
1772}
1773extern "C" {
1774    #[doc = " Creates a `ZL_TypedRef` that represents a regular buffer of bytes.\n\n @param src The reference buffer\n @param srcSize The size of the reference buffer\n\n @returns A `ZL_TypedRef*` of type `ZL_Type_serial`."]
1775    pub fn ZL_TypedRef_createSerial(
1776        src: *const ::std::os::raw::c_void,
1777        srcSize: usize,
1778    ) -> *mut ZL_TypedRef;
1779}
1780extern "C" {
1781    #[doc = " Creates a `ZL_TypedRef` that represents a concatenated list of fields of a\n fixed size of @p structWidth.\n\n @p structWidth can be any size > 0. Even odd sizes (13, 17, etc.) are\n allowed. All fields are considered concatenated back to back. There is no\n alignment requirement.\n\n @param start The start of the reference buffer\n @param structWidth The width of each element in the reference buffer.\n @param structCount The number of elements in the input buffer. The total\n size will be @p structWidth * @p structCount.\n\n @note Struct in this case is just short-hand for fixed-size-fields. It's\n not limited to C-style structures."]
1782    pub fn ZL_TypedRef_createStruct(
1783        start: *const ::std::os::raw::c_void,
1784        structWidth: usize,
1785        structCount: usize,
1786    ) -> *mut ZL_TypedRef;
1787}
1788extern "C" {
1789    #[doc = " Creates a `ZL_TypedRef` that references an array of numeric values,\n employing the local host's endianness.\n Supported widths are 1, 2, 4, and 8 and the input array must be properly\n aligned (in local ABI).\n\n @param start The start of the reference array\n @param numWidth The width of the numeric values\n @param numCount The number of elements in the input array. The total size\n will be @p numWidth * @p numCount.\n"]
1790    pub fn ZL_TypedRef_createNumeric(
1791        start: *const ::std::os::raw::c_void,
1792        numWidth: usize,
1793        numCount: usize,
1794    ) -> *mut ZL_TypedRef;
1795}
1796extern "C" {
1797    #[doc = " Creates a `ZL_TypedRef` referencing a \"flat-strings\" representation. All\n \"strings\" are concatenated into @p strBuffer and their lengths are stored in\n a @p strLens array.\n\n @param strBuffer The data buffer\n @param bufferSize The size of the data buffer\n @param strLengths The lengths array\n @param nbStrings The number of strings (i.e. the size of the lengths array)\n\n @note String is just short-hand for variable-size-fields. It's not limited\n to null-terminated ascii strings. A string can be any blob of bytes,\n including some containing 0-value bytes, because length is explicit."]
1798    pub fn ZL_TypedRef_createString(
1799        strBuffer: *const ::std::os::raw::c_void,
1800        bufferSize: usize,
1801        strLens: *const u32,
1802        nbStrings: usize,
1803    ) -> *mut ZL_TypedRef;
1804}
1805extern "C" {
1806    #[doc = " Frees the given `ZL_TypedRef`.\n\n @param tref the object to free\n\n @note All ZL_TypedRef* objects of any type are released by the same method"]
1807    pub fn ZL_TypedRef_free(tref: *mut ZL_TypedRef);
1808}
1809extern "C" {
1810    #[doc = " Inserts a placeholder for the Automated Compressor Explorer (ACE) to\n replace with an automatically generated graph. It accepts a single input of\n any type.\n\n Before training, this graph will just forward to `ZL_GRAPH_COMPRESS_GENERIC`.\n After training the top-level graph, ACE will replace this component with an\n automatically generated graph that performs well on the training data.\n\n If the same ACE GraphID is used multiple times within a graph, all the inputs\n get passed to the same training, and only a single graph is generated. If\n there are multiple ACE graphs in a top-level graph, each created with a call\n to `ZL_Compressor_buildACEGraph()`, then each unique GraphID will be replaced\n with a trained graph optimized for the inputs passed to that specific\n GraphID.\n\n Input 0: Any type\n\n @returns The placeholder ACE graphID."]
1811    pub fn ZL_Compressor_buildACEGraph(compressor: *mut ZL_Compressor) -> ZL_GraphID;
1812}
1813extern "C" {
1814    #[doc = " @see ZL_Compressor_buildACEGraph"]
1815    pub fn ZL_Compressor_buildACEGraph2(compressor: *mut ZL_Compressor) -> ZL_Result_ZL_GraphID;
1816}
1817extern "C" {
1818    #[doc = " The same as `ZL_Compressor_buildACEGraph`, but uses `defaultGraph` to\n compress until it is trained.\n\n @see ZL_Compressor_buildACEGraph"]
1819    pub fn ZL_Compressor_buildACEGraphWithDefault(
1820        compressor: *mut ZL_Compressor,
1821        defaultGraph: ZL_GraphID,
1822    ) -> ZL_GraphID;
1823}
1824extern "C" {
1825    #[doc = " @see ZL_Compressor_buildACEGraphWithDefault"]
1826    pub fn ZL_Compressor_buildACEGraphWithDefault2(
1827        compressor: *mut ZL_Compressor,
1828        defaultGraph: ZL_GraphID,
1829    ) -> ZL_Result_ZL_GraphID;
1830}
1831pub const ZL_StandardGraphID_illegal: ZL_StandardGraphID = 0;
1832pub const ZL_StandardGraphID_store: ZL_StandardGraphID = 2;
1833pub const ZL_StandardGraphID_fse: ZL_StandardGraphID = 3;
1834pub const ZL_StandardGraphID_huffman: ZL_StandardGraphID = 4;
1835pub const ZL_StandardGraphID_entropy: ZL_StandardGraphID = 5;
1836pub const ZL_StandardGraphID_constant: ZL_StandardGraphID = 6;
1837pub const ZL_StandardGraphID_zstd: ZL_StandardGraphID = 7;
1838pub const ZL_StandardGraphID_bitpack: ZL_StandardGraphID = 8;
1839pub const ZL_StandardGraphID_flatpack: ZL_StandardGraphID = 9;
1840pub const ZL_StandardGraphID_field_lz: ZL_StandardGraphID = 10;
1841pub const ZL_StandardGraphID_compress_generic: ZL_StandardGraphID = 11;
1842pub const ZL_StandardGraphID_select_generic_lz_backend: ZL_StandardGraphID = 12;
1843pub const ZL_StandardGraphID_select_numeric: ZL_StandardGraphID = 13;
1844pub const ZL_StandardGraphID_clustering: ZL_StandardGraphID = 14;
1845pub const ZL_StandardGraphID_try_parse_int: ZL_StandardGraphID = 15;
1846pub const ZL_StandardGraphID_simple_data_description_language: ZL_StandardGraphID = 16;
1847pub const ZL_StandardGraphID_public_end: ZL_StandardGraphID = 17;
1848pub type ZL_StandardGraphID = ::std::os::raw::c_uint;
1849pub const ZL_StandardNodeID_illegal: ZL_StandardNodeID = 0;
1850pub const ZL_StandardNodeID_delta_int: ZL_StandardNodeID = 2;
1851pub const ZL_StandardNodeID_transpose_split: ZL_StandardNodeID = 3;
1852pub const ZL_StandardNodeID_zigzag: ZL_StandardNodeID = 4;
1853pub const ZL_StandardNodeID_dispatchN_byTag: ZL_StandardNodeID = 5;
1854pub const ZL_StandardNodeID_float32_deconstruct: ZL_StandardNodeID = 6;
1855pub const ZL_StandardNodeID_bfloat16_deconstruct: ZL_StandardNodeID = 7;
1856pub const ZL_StandardNodeID_float16_deconstruct: ZL_StandardNodeID = 8;
1857pub const ZL_StandardNodeID_field_lz: ZL_StandardNodeID = 9;
1858pub const ZL_StandardNodeID_convert_struct_to_serial: ZL_StandardNodeID = 10;
1859pub const ZL_StandardNodeID_convert_num_to_struct_le: ZL_StandardNodeID = 11;
1860pub const ZL_StandardNodeID_convert_num_to_serial_le: ZL_StandardNodeID = 12;
1861pub const ZL_StandardNodeID_convert_serial_to_struct: ZL_StandardNodeID = 13;
1862pub const ZL_StandardNodeID_convert_serial_to_struct2: ZL_StandardNodeID = 14;
1863pub const ZL_StandardNodeID_convert_serial_to_struct4: ZL_StandardNodeID = 15;
1864pub const ZL_StandardNodeID_convert_serial_to_struct8: ZL_StandardNodeID = 16;
1865pub const ZL_StandardNodeID_convert_struct_to_num_le: ZL_StandardNodeID = 17;
1866pub const ZL_StandardNodeID_convert_struct_to_num_be: ZL_StandardNodeID = 18;
1867pub const ZL_StandardNodeID_convert_serial_to_num8: ZL_StandardNodeID = 19;
1868pub const ZL_StandardNodeID_convert_serial_to_num_le16: ZL_StandardNodeID = 20;
1869pub const ZL_StandardNodeID_convert_serial_to_num_le32: ZL_StandardNodeID = 21;
1870pub const ZL_StandardNodeID_convert_serial_to_num_le64: ZL_StandardNodeID = 22;
1871pub const ZL_StandardNodeID_convert_serial_to_num_be16: ZL_StandardNodeID = 23;
1872pub const ZL_StandardNodeID_convert_serial_to_num_be32: ZL_StandardNodeID = 24;
1873pub const ZL_StandardNodeID_convert_serial_to_num_be64: ZL_StandardNodeID = 25;
1874pub const ZL_StandardNodeID_separate_string_components: ZL_StandardNodeID = 26;
1875pub const ZL_StandardNodeID_bitunpack: ZL_StandardNodeID = 27;
1876pub const ZL_StandardNodeID_range_pack: ZL_StandardNodeID = 28;
1877pub const ZL_StandardNodeID_merge_sorted: ZL_StandardNodeID = 29;
1878pub const ZL_StandardNodeID_prefix: ZL_StandardNodeID = 30;
1879pub const ZL_StandardNodeID_divide_by: ZL_StandardNodeID = 31;
1880pub const ZL_StandardNodeID_dispatch_string: ZL_StandardNodeID = 32;
1881pub const ZL_StandardNodeID_concat_serial: ZL_StandardNodeID = 33;
1882pub const ZL_StandardNodeID_concat_num: ZL_StandardNodeID = 34;
1883pub const ZL_StandardNodeID_concat_struct: ZL_StandardNodeID = 35;
1884pub const ZL_StandardNodeID_concat_string: ZL_StandardNodeID = 36;
1885pub const ZL_StandardNodeID_dedup_num: ZL_StandardNodeID = 37;
1886pub const ZL_StandardNodeID_parse_int: ZL_StandardNodeID = 38;
1887pub const ZL_StandardNodeID_interleave_string: ZL_StandardNodeID = 39;
1888pub const ZL_StandardNodeID_tokenize_struct: ZL_StandardNodeID = 40;
1889pub const ZL_StandardNodeID_tokenize_numeric: ZL_StandardNodeID = 41;
1890pub const ZL_StandardNodeID_tokenize_string: ZL_StandardNodeID = 42;
1891pub const ZL_StandardNodeID_quantize_offsets: ZL_StandardNodeID = 43;
1892pub const ZL_StandardNodeID_quantize_lengths: ZL_StandardNodeID = 44;
1893pub const ZL_StandardNodeID_public_end: ZL_StandardNodeID = 45;
1894pub type ZL_StandardNodeID = ::std::os::raw::c_uint;
1895pub const ZL_Bitunpack_numBits: _bindgen_ty_1 = 1;
1896pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
1897extern "C" {
1898    pub fn ZL_Compressor_registerBitunpackNode(
1899        cgraph: *mut ZL_Compressor,
1900        nbBits: ::std::os::raw::c_int,
1901    ) -> ZL_NodeID;
1902}
1903extern "C" {
1904    #[doc = " Parameterized brute force selector that selects the best successor from a\n user-provided list of candidates.\n @param successors the list of successors to select from. Each successor must\n be equipped to handle the input stream type."]
1905    pub fn ZL_Compressor_registerBruteForceSelectorGraph(
1906        cgraph: *mut ZL_Compressor,
1907        successors: *const ZL_GraphID,
1908        numSuccessors: usize,
1909    ) -> ZL_GraphID;
1910}
1911extern "C" {
1912    #[link_name = "ZL_codemodInputAsData__extern"]
1913    pub fn ZL_codemodInputAsData(input: *const ZL_Input) -> *const ZL_Data;
1914}
1915extern "C" {
1916    #[link_name = "ZL_codemodDataAsInput__extern"]
1917    pub fn ZL_codemodDataAsInput(data: *const ZL_Data) -> *const ZL_Input;
1918}
1919extern "C" {
1920    #[link_name = "ZL_codemodMutInputAsData__extern"]
1921    pub fn ZL_codemodMutInputAsData(input: *mut ZL_Input) -> *mut ZL_Data;
1922}
1923extern "C" {
1924    #[link_name = "ZL_codemodMutDataAsInput__extern"]
1925    pub fn ZL_codemodMutDataAsInput(data: *mut ZL_Data) -> *mut ZL_Input;
1926}
1927extern "C" {
1928    #[link_name = "ZL_codemodDatasAsInputs__extern"]
1929    pub fn ZL_codemodDatasAsInputs(datas: *mut *const ZL_Data) -> *mut *const ZL_Input;
1930}
1931extern "C" {
1932    #[link_name = "ZL_codemodInputsAsDatas__extern"]
1933    pub fn ZL_codemodInputsAsDatas(inputs: *mut *const ZL_Input) -> *mut *const ZL_Data;
1934}
1935extern "C" {
1936    #[link_name = "ZL_Input_id__extern"]
1937    pub fn ZL_Input_id(input: *const ZL_Input) -> ZL_DataID;
1938}
1939extern "C" {
1940    #[link_name = "ZL_Input_type__extern"]
1941    pub fn ZL_Input_type(input: *const ZL_Input) -> ZL_Type;
1942}
1943extern "C" {
1944    #[doc = " @note invoking `ZL_Data_numElts()` is only valid for committed Data.\n If the Data object was received as an input, it's necessarily valid.\n So the issue can only happen for outputs,\n between allocation and commit.\n Querying `ZL_Data_numElts()` is not expected to be useful for output Data.\n @note `ZL_Type_serial` doesn't really have a concept of \"elt\".\n In this case, it returns Data size in bytes."]
1945    #[link_name = "ZL_Input_numElts__extern"]
1946    pub fn ZL_Input_numElts(input: *const ZL_Input) -> usize;
1947}
1948extern "C" {
1949    #[doc = " @return element width in nb of bytes\n This is only valid for fixed size elements,\n such as `ZL_Type_struct` or `ZL_Type_numeric`.\n If Type is `ZL_Type_string`, it returns 0 instead."]
1950    #[link_name = "ZL_Input_eltWidth__extern"]
1951    pub fn ZL_Input_eltWidth(input: *const ZL_Input) -> usize;
1952}
1953extern "C" {
1954    #[doc = " @return the nb of bytes committed into data's buffer\n (generally `== data->eltWidth * data->nbElts`).\n\n For `ZL_Type_string`, result is equal to `sum(data->stringLens)`.\n Returned value is provided in nb of bytes.\n\n @note invoking this symbol only makes sense if Data was\n previously committed.\n @note (@cyan): ZS2_Data_byteSize() is another name candidate."]
1955    #[link_name = "ZL_Input_contentSize__extern"]
1956    pub fn ZL_Input_contentSize(input: *const ZL_Input) -> usize;
1957}
1958extern "C" {
1959    #[doc = " These methods provide direct access to internal buffer.\n Warning : users must pay attention to buffer boundaries.\n @return pointer to the _beginning_ of buffer.\n @note for `ZL_Type_string`, returns a pointer to the buffer containing the\n concatenated strings."]
1960    #[link_name = "ZL_Input_ptr__extern"]
1961    pub fn ZL_Input_ptr(input: *const ZL_Input) -> *const ::std::os::raw::c_void;
1962}
1963extern "C" {
1964    #[doc = " This method is only valid for `ZL_Type_string` Data.\n @return a pointer to the array of string lengths.\n The size of this array is `== ZL_Data_numElts(data)`.\n @return `NULL` if incorrect data type, or `StringLens` not allocated yet."]
1965    #[link_name = "ZL_Input_stringLens__extern"]
1966    pub fn ZL_Input_stringLens(input: *const ZL_Input) -> *const u32;
1967}
1968extern "C" {
1969    #[doc = " @returns The value if present. ZL_IntMetadata::isPresent != 0\n when the @p key exists, in which case ZL_IntMetadata::mValue is set to the\n value."]
1970    #[link_name = "ZL_Input_getIntMetadata__extern"]
1971    pub fn ZL_Input_getIntMetadata(
1972        input: *const ZL_Input,
1973        key: ::std::os::raw::c_int,
1974    ) -> ZL_IntMetadata;
1975}
1976extern "C" {
1977    #[doc = " @brief Sets integer metadata with the key @p key and value @p value on the\n stream.\n\n It is only valid to call ZL_Input_setIntMetadata() with the same @p key\n once. Subsequent calls with the same @p key will return an error.\n\n @param key Metdata key\n @param value Metadata value\n\n @returns Success or an error. This function will fail due to repeated calls\n with the same @p key, or upon running out of space for the metadata.\n\n @note In this proposed design, Int Metadata are set one by one.\n Another possible design could follow the IntParams\n model, where all parameters must be set all-at-once, and be\n provided as a single vector of IntParams structures.\n\n @note The set value is an int, hence it's not suitable to store \"large\"\n values, like 64-bit ULL."]
1978    #[link_name = "ZL_Input_setIntMetadata__extern"]
1979    pub fn ZL_Input_setIntMetadata(
1980        input: *mut ZL_Input,
1981        key: ::std::os::raw::c_int,
1982        value: ::std::os::raw::c_int,
1983    ) -> ZL_Report;
1984}
1985#[doc = " The function signature for function graphs.\n\n @param graph The graph object containing the graph context\n @param inputs The inputs passed into the function graph to compress\n @param nbInputs The number of inputs in @p inputs"]
1986pub type ZL_FunctionGraphFn = ::std::option::Option<
1987    unsafe extern "C" fn(
1988        graph: *mut ZL_Graph,
1989        inputs: *mut *mut ZL_Edge,
1990        nbInputs: usize,
1991    ) -> ZL_Report,
1992>;
1993pub type ZL_FunctionGraphValidateFn = ::std::option::Option<
1994    unsafe extern "C" fn(
1995        compressor: *const ZL_Compressor,
1996        dgd: *const ZL_FunctionGraphDesc,
1997    ) -> ::std::os::raw::c_int,
1998>;
1999#[repr(C)]
2000#[derive(Debug, Copy, Clone)]
2001pub struct ZL_FunctionGraphDesc {
2002    pub name: *const ::std::os::raw::c_char,
2003    pub graph_f: ZL_FunctionGraphFn,
2004    pub validate_f: ZL_FunctionGraphValidateFn,
2005    pub inputTypeMasks: *const ZL_Type,
2006    pub nbInputs: usize,
2007    pub lastInputIsVariable: ::std::os::raw::c_int,
2008    pub customGraphs: *const ZL_GraphID,
2009    pub nbCustomGraphs: usize,
2010    pub customNodes: *const ZL_NodeID,
2011    pub nbCustomNodes: usize,
2012    pub localParams: ZL_LocalParams,
2013    #[doc = " Optionally an opaque pointer that can be queried with\n ZL_Graph_getOpaquePtr().\n OpenZL unconditionally takes ownership of this pointer, even if\n registration fails, and it lives for the lifetime of the compressor."]
2014    pub opaque: ZL_OpaquePtr,
2015}
2016#[test]
2017fn bindgen_test_layout_ZL_FunctionGraphDesc() {
2018    const UNINIT: ::std::mem::MaybeUninit<ZL_FunctionGraphDesc> = ::std::mem::MaybeUninit::uninit();
2019    let ptr = UNINIT.as_ptr();
2020    assert_eq!(
2021        ::std::mem::size_of::<ZL_FunctionGraphDesc>(),
2022        152usize,
2023        "Size of ZL_FunctionGraphDesc"
2024    );
2025    assert_eq!(
2026        ::std::mem::align_of::<ZL_FunctionGraphDesc>(),
2027        8usize,
2028        "Alignment of ZL_FunctionGraphDesc"
2029    );
2030    assert_eq!(
2031        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
2032        0usize,
2033        "Offset of field: ZL_FunctionGraphDesc::name"
2034    );
2035    assert_eq!(
2036        unsafe { ::std::ptr::addr_of!((*ptr).graph_f) as usize - ptr as usize },
2037        8usize,
2038        "Offset of field: ZL_FunctionGraphDesc::graph_f"
2039    );
2040    assert_eq!(
2041        unsafe { ::std::ptr::addr_of!((*ptr).validate_f) as usize - ptr as usize },
2042        16usize,
2043        "Offset of field: ZL_FunctionGraphDesc::validate_f"
2044    );
2045    assert_eq!(
2046        unsafe { ::std::ptr::addr_of!((*ptr).inputTypeMasks) as usize - ptr as usize },
2047        24usize,
2048        "Offset of field: ZL_FunctionGraphDesc::inputTypeMasks"
2049    );
2050    assert_eq!(
2051        unsafe { ::std::ptr::addr_of!((*ptr).nbInputs) as usize - ptr as usize },
2052        32usize,
2053        "Offset of field: ZL_FunctionGraphDesc::nbInputs"
2054    );
2055    assert_eq!(
2056        unsafe { ::std::ptr::addr_of!((*ptr).lastInputIsVariable) as usize - ptr as usize },
2057        40usize,
2058        "Offset of field: ZL_FunctionGraphDesc::lastInputIsVariable"
2059    );
2060    assert_eq!(
2061        unsafe { ::std::ptr::addr_of!((*ptr).customGraphs) as usize - ptr as usize },
2062        48usize,
2063        "Offset of field: ZL_FunctionGraphDesc::customGraphs"
2064    );
2065    assert_eq!(
2066        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomGraphs) as usize - ptr as usize },
2067        56usize,
2068        "Offset of field: ZL_FunctionGraphDesc::nbCustomGraphs"
2069    );
2070    assert_eq!(
2071        unsafe { ::std::ptr::addr_of!((*ptr).customNodes) as usize - ptr as usize },
2072        64usize,
2073        "Offset of field: ZL_FunctionGraphDesc::customNodes"
2074    );
2075    assert_eq!(
2076        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomNodes) as usize - ptr as usize },
2077        72usize,
2078        "Offset of field: ZL_FunctionGraphDesc::nbCustomNodes"
2079    );
2080    assert_eq!(
2081        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
2082        80usize,
2083        "Offset of field: ZL_FunctionGraphDesc::localParams"
2084    );
2085    assert_eq!(
2086        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
2087        128usize,
2088        "Offset of field: ZL_FunctionGraphDesc::opaque"
2089    );
2090}
2091extern "C" {
2092    #[doc = " Registers a function graph given the @p desc.\n\n @note This is a new variant of @ref ZL_Compressor_registerFunctionGraph that\n reports errors using OpenZL's ZL_Report error system.\n\n @param desc The description of the graph, must be non-null.\n\n @return The new graph ID, or an error."]
2093    pub fn ZL_Compressor_registerFunctionGraph2(
2094        compressor: *mut ZL_Compressor,
2095        dgd: *const ZL_FunctionGraphDesc,
2096    ) -> ZL_Result_ZL_GraphID;
2097}
2098extern "C" {
2099    pub fn ZL_Compressor_registerFunctionGraph(
2100        compressor: *mut ZL_Compressor,
2101        dgd: *const ZL_FunctionGraphDesc,
2102    ) -> ZL_GraphID;
2103}
2104extern "C" {
2105    #[doc = " Registration might fail if the Descriptor is incorrectly filled,\n Any further operation attempted with such a Graph will also fail.\n Such an outcome can be tested with ZL_GraphID_isValid().\n Note: this is mostly for debugging purposes,\n once a Descriptor is valid, registration can be assumed to be successful."]
2106    pub fn ZL_GraphID_isValid(graphid: ZL_GraphID) -> ::std::os::raw::c_int;
2107}
2108extern "C" {
2109    pub fn ZL_Graph_getCustomGraphs(gctx: *const ZL_Graph) -> ZL_GraphIDList;
2110}
2111extern "C" {
2112    pub fn ZL_Graph_getCustomNodes(gctx: *const ZL_Graph) -> ZL_NodeIDList;
2113}
2114extern "C" {
2115    pub fn ZL_Graph_getCParam(gctx: *const ZL_Graph, gparam: ZL_CParam) -> ::std::os::raw::c_int;
2116}
2117extern "C" {
2118    pub fn ZL_Graph_getLocalIntParam(
2119        gctx: *const ZL_Graph,
2120        intParamId: ::std::os::raw::c_int,
2121    ) -> ZL_IntParam;
2122}
2123extern "C" {
2124    pub fn ZL_Graph_getLocalRefParam(
2125        gctx: *const ZL_Graph,
2126        refParamId: ::std::os::raw::c_int,
2127    ) -> ZL_RefParam;
2128}
2129extern "C" {
2130    #[doc = " Determines whether @nodeid is supported given the applied global parameters\n for the compression.\n Notably the ZL_CParam_formatVersion parameter can determine if a node is\n valid for the given encoding version."]
2131    pub fn ZL_Graph_isNodeSupported(gctx: *const ZL_Graph, nodeid: ZL_NodeID) -> bool;
2132}
2133extern "C" {
2134    pub fn ZL_Graph_getOpaquePtr(graph: *const ZL_Graph) -> *const ::std::os::raw::c_void;
2135}
2136extern "C" {
2137    pub fn ZL_Edge_getData(sctx: *const ZL_Edge) -> *const ZL_Input;
2138}
2139#[doc = " @defgroup Group_Compressor_GraphCustomization Graph Customization\n\n Graphs can be customized to override their name, local parameters, custom\n nodes and custom graphs. This is an advanced use case, and mainly an\n implementation detail of graphs. Most graphs which accept parameters provide\n helper functions to correctly parameterize the graph.\n\n @{"]
2140pub type ZL_RuntimeGraphParameters = ZL_GraphParameters_s;
2141extern "C" {
2142    pub fn ZL_Graph_getScratchSpace(
2143        gctx: *mut ZL_Graph,
2144        size: usize,
2145    ) -> *mut ::std::os::raw::c_void;
2146}
2147#[doc = " A measurement of graph performance.\n Currently this is compressed size, but it is expected to be expanded to\n include speed."]
2148#[repr(C)]
2149#[derive(Debug, Copy, Clone)]
2150pub struct ZL_GraphPerformance {
2151    #[doc = " The compressed size of the graph on the given input(s)"]
2152    pub compressedSize: usize,
2153}
2154#[test]
2155fn bindgen_test_layout_ZL_GraphPerformance() {
2156    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphPerformance> = ::std::mem::MaybeUninit::uninit();
2157    let ptr = UNINIT.as_ptr();
2158    assert_eq!(
2159        ::std::mem::size_of::<ZL_GraphPerformance>(),
2160        8usize,
2161        "Size of ZL_GraphPerformance"
2162    );
2163    assert_eq!(
2164        ::std::mem::align_of::<ZL_GraphPerformance>(),
2165        8usize,
2166        "Alignment of ZL_GraphPerformance"
2167    );
2168    assert_eq!(
2169        unsafe { ::std::ptr::addr_of!((*ptr).compressedSize) as usize - ptr as usize },
2170        0usize,
2171        "Offset of field: ZL_GraphPerformance::compressedSize"
2172    );
2173}
2174#[repr(C)]
2175#[derive(Debug, Copy, Clone)]
2176pub struct ZL_Result_ZL_GraphPerformance_inner {
2177    pub _code: ZL_ErrorCode,
2178    pub _value: ZL_GraphPerformance,
2179}
2180#[test]
2181fn bindgen_test_layout_ZL_Result_ZL_GraphPerformance_inner() {
2182    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_GraphPerformance_inner> =
2183        ::std::mem::MaybeUninit::uninit();
2184    let ptr = UNINIT.as_ptr();
2185    assert_eq!(
2186        ::std::mem::size_of::<ZL_Result_ZL_GraphPerformance_inner>(),
2187        16usize,
2188        "Size of ZL_Result_ZL_GraphPerformance_inner"
2189    );
2190    assert_eq!(
2191        ::std::mem::align_of::<ZL_Result_ZL_GraphPerformance_inner>(),
2192        8usize,
2193        "Alignment of ZL_Result_ZL_GraphPerformance_inner"
2194    );
2195    assert_eq!(
2196        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
2197        0usize,
2198        "Offset of field: ZL_Result_ZL_GraphPerformance_inner::_code"
2199    );
2200    assert_eq!(
2201        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
2202        8usize,
2203        "Offset of field: ZL_Result_ZL_GraphPerformance_inner::_value"
2204    );
2205}
2206#[repr(C)]
2207#[derive(Copy, Clone)]
2208pub union ZL_Result_ZL_GraphPerformance_u {
2209    pub _code: ZL_ErrorCode,
2210    pub _value: ZL_Result_ZL_GraphPerformance_inner,
2211    pub _error: ZL_Error,
2212}
2213#[test]
2214fn bindgen_test_layout_ZL_Result_ZL_GraphPerformance_u() {
2215    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_GraphPerformance_u> =
2216        ::std::mem::MaybeUninit::uninit();
2217    let ptr = UNINIT.as_ptr();
2218    assert_eq!(
2219        ::std::mem::size_of::<ZL_Result_ZL_GraphPerformance_u>(),
2220        16usize,
2221        "Size of ZL_Result_ZL_GraphPerformance_u"
2222    );
2223    assert_eq!(
2224        ::std::mem::align_of::<ZL_Result_ZL_GraphPerformance_u>(),
2225        8usize,
2226        "Alignment of ZL_Result_ZL_GraphPerformance_u"
2227    );
2228    assert_eq!(
2229        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
2230        0usize,
2231        "Offset of field: ZL_Result_ZL_GraphPerformance_u::_code"
2232    );
2233    assert_eq!(
2234        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
2235        0usize,
2236        "Offset of field: ZL_Result_ZL_GraphPerformance_u::_value"
2237    );
2238    assert_eq!(
2239        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
2240        0usize,
2241        "Offset of field: ZL_Result_ZL_GraphPerformance_u::_error"
2242    );
2243}
2244pub type ZL_Result_ZL_GraphPerformance = ZL_Result_ZL_GraphPerformance_u;
2245extern "C" {
2246    #[link_name = "ZL_Result_ZL_GraphPerformance_extract__extern"]
2247    pub fn ZL_Result_ZL_GraphPerformance_extract(
2248        result: ZL_Result_ZL_GraphPerformance,
2249        error: *mut ZL_Error,
2250    ) -> ZL_GraphPerformance;
2251}
2252pub type ZL_Result_ZL_GraphPerformance_fake_type_needs_semicolon = ::std::os::raw::c_int;
2253extern "C" {
2254    #[doc = " @brief Attempt compression using a graph and return the performance.\n\n This API allows the user to simulate the execution of a given @p graphID\n on an input to measure its performance. This API is wasteful in CPU and\n memory and should only be used when there is no better choice.\n\n @param input The input to try compress on\n @param graphID The GraphID to use to compress the @p input\n @param params The runtime parameters for the @p graphID, or `NULL` to not\n parameterize the graph.\n\n @returns If the compression failed it returns a non-fatal error. Otherwise,\n it returns the performance of the @p graphID on the @p input."]
2255    pub fn ZL_Graph_tryGraph(
2256        gctx: *const ZL_Graph,
2257        input: *const ZL_Input,
2258        graphID: ZL_GraphID,
2259        params: *const ZL_RuntimeGraphParameters,
2260    ) -> ZL_Result_ZL_GraphPerformance;
2261}
2262extern "C" {
2263    #[doc = " @brief Attempt compression using a graph and return the performance.\n\n The same as @ref ZL_Graph_tryGraph except it accepts multiple inputs."]
2264    pub fn ZL_Graph_tryMultiInputGraph(
2265        gctx: *const ZL_Graph,
2266        inputs: *mut *const ZL_Input,
2267        numInputs: usize,
2268        graphID: ZL_GraphID,
2269        params: *const ZL_RuntimeGraphParameters,
2270    ) -> ZL_Result_ZL_GraphPerformance;
2271}
2272#[repr(C)]
2273#[derive(Copy, Clone)]
2274pub struct ZL_EdgeList {
2275    pub field_1: ZL_EdgeList__bindgen_ty_1,
2276    pub field_2: ZL_EdgeList__bindgen_ty_2,
2277}
2278#[repr(C)]
2279#[derive(Copy, Clone)]
2280pub union ZL_EdgeList__bindgen_ty_1 {
2281    pub edges: *mut *mut ZL_Edge,
2282    pub streams: *mut *mut ZL_Edge,
2283}
2284#[test]
2285fn bindgen_test_layout_ZL_EdgeList__bindgen_ty_1() {
2286    const UNINIT: ::std::mem::MaybeUninit<ZL_EdgeList__bindgen_ty_1> =
2287        ::std::mem::MaybeUninit::uninit();
2288    let ptr = UNINIT.as_ptr();
2289    assert_eq!(
2290        ::std::mem::size_of::<ZL_EdgeList__bindgen_ty_1>(),
2291        8usize,
2292        "Size of ZL_EdgeList__bindgen_ty_1"
2293    );
2294    assert_eq!(
2295        ::std::mem::align_of::<ZL_EdgeList__bindgen_ty_1>(),
2296        8usize,
2297        "Alignment of ZL_EdgeList__bindgen_ty_1"
2298    );
2299    assert_eq!(
2300        unsafe { ::std::ptr::addr_of!((*ptr).edges) as usize - ptr as usize },
2301        0usize,
2302        "Offset of field: ZL_EdgeList__bindgen_ty_1::edges"
2303    );
2304    assert_eq!(
2305        unsafe { ::std::ptr::addr_of!((*ptr).streams) as usize - ptr as usize },
2306        0usize,
2307        "Offset of field: ZL_EdgeList__bindgen_ty_1::streams"
2308    );
2309}
2310#[repr(C)]
2311#[derive(Copy, Clone)]
2312pub union ZL_EdgeList__bindgen_ty_2 {
2313    pub nbEdges: usize,
2314    pub nbStreams: usize,
2315}
2316#[test]
2317fn bindgen_test_layout_ZL_EdgeList__bindgen_ty_2() {
2318    const UNINIT: ::std::mem::MaybeUninit<ZL_EdgeList__bindgen_ty_2> =
2319        ::std::mem::MaybeUninit::uninit();
2320    let ptr = UNINIT.as_ptr();
2321    assert_eq!(
2322        ::std::mem::size_of::<ZL_EdgeList__bindgen_ty_2>(),
2323        8usize,
2324        "Size of ZL_EdgeList__bindgen_ty_2"
2325    );
2326    assert_eq!(
2327        ::std::mem::align_of::<ZL_EdgeList__bindgen_ty_2>(),
2328        8usize,
2329        "Alignment of ZL_EdgeList__bindgen_ty_2"
2330    );
2331    assert_eq!(
2332        unsafe { ::std::ptr::addr_of!((*ptr).nbEdges) as usize - ptr as usize },
2333        0usize,
2334        "Offset of field: ZL_EdgeList__bindgen_ty_2::nbEdges"
2335    );
2336    assert_eq!(
2337        unsafe { ::std::ptr::addr_of!((*ptr).nbStreams) as usize - ptr as usize },
2338        0usize,
2339        "Offset of field: ZL_EdgeList__bindgen_ty_2::nbStreams"
2340    );
2341}
2342#[test]
2343fn bindgen_test_layout_ZL_EdgeList() {
2344    assert_eq!(
2345        ::std::mem::size_of::<ZL_EdgeList>(),
2346        16usize,
2347        "Size of ZL_EdgeList"
2348    );
2349    assert_eq!(
2350        ::std::mem::align_of::<ZL_EdgeList>(),
2351        8usize,
2352        "Alignment of ZL_EdgeList"
2353    );
2354}
2355#[repr(C)]
2356#[derive(Copy, Clone)]
2357pub struct ZL_Result_ZL_EdgeList_inner {
2358    pub _code: ZL_ErrorCode,
2359    pub _value: ZL_EdgeList,
2360}
2361#[test]
2362fn bindgen_test_layout_ZL_Result_ZL_EdgeList_inner() {
2363    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_EdgeList_inner> =
2364        ::std::mem::MaybeUninit::uninit();
2365    let ptr = UNINIT.as_ptr();
2366    assert_eq!(
2367        ::std::mem::size_of::<ZL_Result_ZL_EdgeList_inner>(),
2368        24usize,
2369        "Size of ZL_Result_ZL_EdgeList_inner"
2370    );
2371    assert_eq!(
2372        ::std::mem::align_of::<ZL_Result_ZL_EdgeList_inner>(),
2373        8usize,
2374        "Alignment of ZL_Result_ZL_EdgeList_inner"
2375    );
2376    assert_eq!(
2377        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
2378        0usize,
2379        "Offset of field: ZL_Result_ZL_EdgeList_inner::_code"
2380    );
2381    assert_eq!(
2382        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
2383        8usize,
2384        "Offset of field: ZL_Result_ZL_EdgeList_inner::_value"
2385    );
2386}
2387#[repr(C)]
2388#[derive(Copy, Clone)]
2389pub union ZL_Result_ZL_EdgeList_u {
2390    pub _code: ZL_ErrorCode,
2391    pub _value: ZL_Result_ZL_EdgeList_inner,
2392    pub _error: ZL_Error,
2393}
2394#[test]
2395fn bindgen_test_layout_ZL_Result_ZL_EdgeList_u() {
2396    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_EdgeList_u> =
2397        ::std::mem::MaybeUninit::uninit();
2398    let ptr = UNINIT.as_ptr();
2399    assert_eq!(
2400        ::std::mem::size_of::<ZL_Result_ZL_EdgeList_u>(),
2401        24usize,
2402        "Size of ZL_Result_ZL_EdgeList_u"
2403    );
2404    assert_eq!(
2405        ::std::mem::align_of::<ZL_Result_ZL_EdgeList_u>(),
2406        8usize,
2407        "Alignment of ZL_Result_ZL_EdgeList_u"
2408    );
2409    assert_eq!(
2410        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
2411        0usize,
2412        "Offset of field: ZL_Result_ZL_EdgeList_u::_code"
2413    );
2414    assert_eq!(
2415        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
2416        0usize,
2417        "Offset of field: ZL_Result_ZL_EdgeList_u::_value"
2418    );
2419    assert_eq!(
2420        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
2421        0usize,
2422        "Offset of field: ZL_Result_ZL_EdgeList_u::_error"
2423    );
2424}
2425pub type ZL_Result_ZL_EdgeList = ZL_Result_ZL_EdgeList_u;
2426extern "C" {
2427    #[link_name = "ZL_Result_ZL_EdgeList_extract__extern"]
2428    pub fn ZL_Result_ZL_EdgeList_extract(
2429        result: ZL_Result_ZL_EdgeList,
2430        error: *mut ZL_Error,
2431    ) -> ZL_EdgeList;
2432}
2433pub type ZL_Result_ZL_EdgeList_fake_type_needs_semicolon = ::std::os::raw::c_int;
2434extern "C" {
2435    pub fn ZL_Edge_runNode(input: *mut ZL_Edge, nid: ZL_NodeID) -> ZL_Result_ZL_EdgeList;
2436}
2437extern "C" {
2438    pub fn ZL_Edge_runNode_withParams(
2439        input: *mut ZL_Edge,
2440        nid: ZL_NodeID,
2441        localParams: *const ZL_LocalParams,
2442    ) -> ZL_Result_ZL_EdgeList;
2443}
2444extern "C" {
2445    pub fn ZL_Edge_runMultiInputNode(
2446        inputs: *mut *mut ZL_Edge,
2447        nbInputs: usize,
2448        nid: ZL_NodeID,
2449    ) -> ZL_Result_ZL_EdgeList;
2450}
2451extern "C" {
2452    pub fn ZL_Edge_runMultiInputNode_withParams(
2453        inputs: *mut *mut ZL_Edge,
2454        nbInputs: usize,
2455        nid: ZL_NodeID,
2456        localParams: *const ZL_LocalParams,
2457    ) -> ZL_Result_ZL_EdgeList;
2458}
2459extern "C" {
2460    #[doc = " @brief Sets the int metadata for the edge to @p mValue\n\n @param mId The identifier for the stream metadata on the edge to set metadata\n on\n @param mValue The value to set stream metadata"]
2461    pub fn ZL_Edge_setIntMetadata(
2462        edge: *mut ZL_Edge,
2463        mId: ::std::os::raw::c_int,
2464        mValue: ::std::os::raw::c_int,
2465    ) -> ZL_Report;
2466}
2467extern "C" {
2468    pub fn ZL_Edge_setDestination(edge: *mut ZL_Edge, gid: ZL_GraphID) -> ZL_Report;
2469}
2470extern "C" {
2471    #[doc = " @brief Sets the destination of the provided edges to the provided graph ID,\n overriding its behavior with the provided parameters.\n\n @param edges Array of edges to direct towards the successor graph.\n @param nbInputs The number of edges in the provided array.\n @param gid The ID of the successor graph.\n @param rGraphParams The parameters to use for the successor graph. NULL means\n don't override."]
2472    pub fn ZL_Edge_setParameterizedDestination(
2473        edges: *mut *mut ZL_Edge,
2474        nbInputs: usize,
2475        gid: ZL_GraphID,
2476        rGraphParams: *const ZL_RuntimeGraphParameters,
2477    ) -> ZL_Report;
2478}
2479extern "C" {
2480    #[doc = " Helper function to parameterize the `ZL_NODE_CONVERT_SERIAL_TO_STRUCT` node\n with the struct size.\n\n Input: Serial\n Output: Struct"]
2481    pub fn ZL_Compressor_parameterizeConvertSerialToStructNode(
2482        compressor: *mut ZL_Compressor,
2483        structSize: ::std::os::raw::c_int,
2484    ) -> ZL_Result_ZL_NodeID;
2485}
2486extern "C" {
2487    #[doc = " Convert from serial to `bitWidth`-bit little-endian numeric data.\n\n @pre bitWidth must be 8, 16, 32, or 64.\n\n Input: Serial\n Output: Numeric"]
2488    pub fn ZL_Node_convertSerialToNumLE(bitWidth: usize) -> ZL_NodeID;
2489}
2490extern "C" {
2491    #[doc = " Convert from serial to `bitWidth`-bit big-endian numeric data.\n\n @pre bitWidth must be 8, 16, 32, or 64.\n\n Input: Serial\n Output: Numeric"]
2492    pub fn ZL_Node_convertSerialToNumBE(bitWidth: usize) -> ZL_NodeID;
2493}
2494#[repr(C)]
2495#[derive(Debug, Copy, Clone)]
2496pub struct ZL_SetStringLensInstructions {
2497    pub stringLens: *const u32,
2498    pub nbStrings: usize,
2499}
2500#[test]
2501fn bindgen_test_layout_ZL_SetStringLensInstructions() {
2502    const UNINIT: ::std::mem::MaybeUninit<ZL_SetStringLensInstructions> =
2503        ::std::mem::MaybeUninit::uninit();
2504    let ptr = UNINIT.as_ptr();
2505    assert_eq!(
2506        ::std::mem::size_of::<ZL_SetStringLensInstructions>(),
2507        16usize,
2508        "Size of ZL_SetStringLensInstructions"
2509    );
2510    assert_eq!(
2511        ::std::mem::align_of::<ZL_SetStringLensInstructions>(),
2512        8usize,
2513        "Alignment of ZL_SetStringLensInstructions"
2514    );
2515    assert_eq!(
2516        unsafe { ::std::ptr::addr_of!((*ptr).stringLens) as usize - ptr as usize },
2517        0usize,
2518        "Offset of field: ZL_SetStringLensInstructions::stringLens"
2519    );
2520    assert_eq!(
2521        unsafe { ::std::ptr::addr_of!((*ptr).nbStrings) as usize - ptr as usize },
2522        8usize,
2523        "Offset of field: ZL_SetStringLensInstructions::nbStrings"
2524    );
2525}
2526#[repr(C)]
2527#[derive(Debug, Copy, Clone)]
2528pub struct ZL_SetStringLensState_s {
2529    _unused: [u8; 0],
2530}
2531pub type ZL_SetStringLensState = ZL_SetStringLensState_s;
2532pub type ZL_SetStringLensParserFn = ::std::option::Option<
2533    unsafe extern "C" fn(
2534        state: *mut ZL_SetStringLensState,
2535        in_: *const ZL_Input,
2536    ) -> ZL_SetStringLensInstructions,
2537>;
2538extern "C" {
2539    pub fn ZL_SetStringLensState_getOpaquePtr(
2540        state: *const ZL_SetStringLensState,
2541    ) -> *const ::std::os::raw::c_void;
2542}
2543extern "C" {
2544    pub fn ZL_SetStringLensState_malloc(
2545        state: *mut ZL_SetStringLensState,
2546        size: usize,
2547    ) -> *mut ::std::os::raw::c_void;
2548}
2549extern "C" {
2550    pub fn ZL_Compressor_registerConvertSerialToStringNode(
2551        cgraph: *mut ZL_Compressor,
2552        f: ZL_SetStringLensParserFn,
2553        opaque: *const ::std::os::raw::c_void,
2554    ) -> ZL_NodeID;
2555}
2556extern "C" {
2557    pub fn ZL_Edge_runConvertSerialToStringNode(
2558        sctx: *mut ZL_Edge,
2559        stringLens: *const u32,
2560        nbString: usize,
2561    ) -> ZL_Result_ZL_EdgeList;
2562}
2563pub const ZL_trlip_tokenSize: _bindgen_ty_2 = 1;
2564pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
2565extern "C" {
2566    #[link_name = "ZL_Node_interpretAsLE__extern"]
2567    pub fn ZL_Node_interpretAsLE(bitWidth: usize) -> ZL_NodeID;
2568}
2569#[repr(C)]
2570#[derive(Debug, Copy, Clone)]
2571pub struct ZL_DispatchInstructions {
2572    pub segmentSizes: *const usize,
2573    pub tags: *const ::std::os::raw::c_uint,
2574    pub nbSegments: usize,
2575    pub nbTags: ::std::os::raw::c_uint,
2576}
2577#[test]
2578fn bindgen_test_layout_ZL_DispatchInstructions() {
2579    const UNINIT: ::std::mem::MaybeUninit<ZL_DispatchInstructions> =
2580        ::std::mem::MaybeUninit::uninit();
2581    let ptr = UNINIT.as_ptr();
2582    assert_eq!(
2583        ::std::mem::size_of::<ZL_DispatchInstructions>(),
2584        32usize,
2585        "Size of ZL_DispatchInstructions"
2586    );
2587    assert_eq!(
2588        ::std::mem::align_of::<ZL_DispatchInstructions>(),
2589        8usize,
2590        "Alignment of ZL_DispatchInstructions"
2591    );
2592    assert_eq!(
2593        unsafe { ::std::ptr::addr_of!((*ptr).segmentSizes) as usize - ptr as usize },
2594        0usize,
2595        "Offset of field: ZL_DispatchInstructions::segmentSizes"
2596    );
2597    assert_eq!(
2598        unsafe { ::std::ptr::addr_of!((*ptr).tags) as usize - ptr as usize },
2599        8usize,
2600        "Offset of field: ZL_DispatchInstructions::tags"
2601    );
2602    assert_eq!(
2603        unsafe { ::std::ptr::addr_of!((*ptr).nbSegments) as usize - ptr as usize },
2604        16usize,
2605        "Offset of field: ZL_DispatchInstructions::nbSegments"
2606    );
2607    assert_eq!(
2608        unsafe { ::std::ptr::addr_of!((*ptr).nbTags) as usize - ptr as usize },
2609        24usize,
2610        "Offset of field: ZL_DispatchInstructions::nbTags"
2611    );
2612}
2613#[repr(C)]
2614#[derive(Debug, Copy, Clone)]
2615pub struct ZL_DispatchState_s {
2616    _unused: [u8; 0],
2617}
2618pub type ZL_DispatchState = ZL_DispatchState_s;
2619extern "C" {
2620    pub fn ZL_DispatchState_malloc(
2621        state: *mut ZL_DispatchState,
2622        size: usize,
2623    ) -> *mut ::std::os::raw::c_void;
2624}
2625extern "C" {
2626    #[doc = " Provides an opaque pointer that can be useful to provide state to the parser.\n For example, it can be used by language bindings to allow parsers written in\n languages other than C.\n\n @returns The opaque pointer provided to @fn\n ZL_Compressor_registerDispatchNode(). WARNING: ZStrong does not manage the\n lifetime of this pointer, it must outlive the ZL_Compressor."]
2627    pub fn ZL_DispatchState_getOpaquePtr(
2628        state: *const ZL_DispatchState,
2629    ) -> *const ::std::os::raw::c_void;
2630}
2631extern "C" {
2632    #[doc = " @returns An error from the parser function and places the @p message into\n Zstrong's error context."]
2633    pub fn ZL_DispatchState_returnError(
2634        state: *mut ZL_DispatchState,
2635        message: *const ::std::os::raw::c_char,
2636    ) -> ZL_DispatchInstructions;
2637}
2638pub type ZL_DispatchParserFn = ::std::option::Option<
2639    unsafe extern "C" fn(
2640        state: *mut ZL_DispatchState,
2641        in_: *const ZL_Input,
2642    ) -> ZL_DispatchInstructions,
2643>;
2644extern "C" {
2645    pub fn ZL_Compressor_registerDispatchNode(
2646        cgraph: *mut ZL_Compressor,
2647        f: ZL_DispatchParserFn,
2648        opaque: *const ::std::os::raw::c_void,
2649    ) -> ZL_NodeID;
2650}
2651extern "C" {
2652    #[doc = " Run the DispatchN node in the context of a dynamic graph,\n following runtime-defined  @p instructions.\n\n @returns The list of Streams produced by the Transform,\n or an error if the operation fails (invalid instruction or input for example)"]
2653    pub fn ZL_Edge_runDispatchNode(
2654        sctx: *mut ZL_Edge,
2655        instructions: *const ZL_DispatchInstructions,
2656    ) -> ZL_Result_ZL_EdgeList;
2657}
2658extern "C" {
2659    #[doc = " Convenience function to get the maximum number of dispatches supported by the\n current encoder version."]
2660    pub fn ZL_DispatchString_maxDispatches() -> usize;
2661}
2662extern "C" {
2663    #[doc = " @param nbOutputs - the number of output streams to be generated. Passed as a\n local param to the transform.\n @param dispatchIndices - the array of indices to be used for dispatching.\n Will be passed as a local param to the transform. The lifetime of the array\n is to be managed by the caller and should outlive the transform execution."]
2664    pub fn ZL_Compressor_registerDispatchStringNode(
2665        cgraph: *mut ZL_Compressor,
2666        nbOutputsParam: ::std::os::raw::c_int,
2667        dispatchIndicesParam: *const u16,
2668    ) -> ZL_NodeID;
2669}
2670extern "C" {
2671    #[doc = " Run the ZL_NODE_DISPATCH_STRING Node in the context of a Dynamic Graph,\n applying runtime defined parameters."]
2672    pub fn ZL_Edge_runDispatchStringNode(
2673        sctx: *mut ZL_Edge,
2674        nbOutputs: ::std::os::raw::c_int,
2675        indices: *const u16,
2676    ) -> ZL_Result_ZL_EdgeList;
2677}
2678extern "C" {
2679    #[doc = " Creates the divide by node with its divisor set to @p divisor.\n\n @returns Returns the modified divide by node with its divisor set to @p\n divisor."]
2680    pub fn ZL_Compressor_registerDivideByNode(
2681        cgraph: *mut ZL_Compressor,
2682        divisor: u64,
2683    ) -> ZL_NodeID;
2684}
2685extern "C" {
2686    #[doc = " DEPRECATED: Use ZL_GRAPH_FIELD_LZ instead.\n @returns ZL_GRAPH_FIELD_LZ"]
2687    pub fn ZL_Compressor_registerFieldLZGraph(cgraph: *mut ZL_Compressor) -> ZL_GraphID;
2688}
2689extern "C" {
2690    #[doc = " @returns ZL_GRAPH_FIELD_LZ with overridden compression level"]
2691    pub fn ZL_Compressor_registerFieldLZGraph_withLevel(
2692        cgraph: *mut ZL_Compressor,
2693        compressionLevel: ::std::os::raw::c_int,
2694    ) -> ZL_GraphID;
2695}
2696extern "C" {
2697    #[doc = " Creates a Field LZ graph with a custom literals compressor.\n\n Field LZ compresses a fixed size field stream using LZ compression\n that only matches entire fields.\n\n Input: A fixed size stream of width 1, 2, 4, or 8.\n\n @param literalsGraph a graph which takes a fixed size field of the\n same width as the input. All fields that we can't find matches for\n are passed to the literals stream."]
2698    pub fn ZL_Compressor_registerFieldLZGraph_withLiteralsGraph(
2699        cgraph: *mut ZL_Compressor,
2700        literalsGraph: ZL_GraphID,
2701    ) -> ZL_GraphID;
2702}
2703extern "C" {
2704    #[doc = " Creates a graph for ZL_NODE_MERGE_SORTED that first detects whether\n the input has <= 64 sorted runs. If it does it selects the node.\n Otherwise it selects the backupGraph."]
2705    pub fn ZL_Compressor_registerMergeSortedGraph(
2706        cgraph: *mut ZL_Compressor,
2707        bitsetGraph: ZL_GraphID,
2708        mergedGraph: ZL_GraphID,
2709        backupGraph: ZL_GraphID,
2710    ) -> ZL_GraphID;
2711}
2712extern "C" {
2713    #[doc = " Returns a parameterized version of the try parse int graph with the required\n successors of the graph.\n\n @param numSuccessor The successor to send strings that successfully parse as\n integers\n @param exceptionSucesssor The successor to send strings that fail to parse as\n integers\n @return The graphID for the parameterized Try Parse Int graph"]
2714    pub fn ZL_Compressor_parameterizeTryParseIntGraph(
2715        compressor: *mut ZL_Compressor,
2716        numSuccessor: ZL_GraphID,
2717        exceptionSuccessor: ZL_GraphID,
2718    ) -> ZL_Result_ZL_GraphID;
2719}
2720extern "C" {
2721    #[doc = " Builds a Simple Data Description Language graph with the provided\n (pre-compiled) @p description and @p successor graph.\n\n See the SDDL page in the documentation for a complete description of this\n component.\n\n ### Graph Topology\n\n ``` mermaid\n flowchart TD\n     subgraph SDDL Graph\n         Desc([Description]);\n         Input([Input]);\n         Conv@{ shape: procs, label: \"Type Conversions\"};\n         Engine[SDDL Engine];\n         Inst([Instructions]);\n         Disp[/Dispatch Transform\\];\n         Succ[Successor Graph];\n\n         Desc --> Engine;\n         Input --> Engine;\n         Engine --> Inst;\n         Inst -->|Dispatch Instructions| Disp;\n         Input --> Disp;\n         Inst -->|Type Information| Conv;\n         Disp ==>|Many Streams| Conv;\n         Conv ==>|Many Streams| Succ;\n     end\n\n     OuterInput[ZL_Input] --> Input;\n     OuterParam[ZL_LocalCopyParam] --> Desc;\n ```\n\n This graph takes a single serial input and applies the @p description to it,\n using that description to decompose the input into fields which are mapped\n to one or more output streams. These streams, as well as two control streams\n are all sent to a single invocation of the @p successor graph. @p successor\n must therefore be a multi-input graph able to accept any number of numeric\n and serial streams (at least).\n\n (The control streams are: a numeric stream containing the stream indices\n into which each field has been placed and a numeric stream containing the\n size of each field. See also the documentation for `dispatchN_byTag` and\n particularly, @ref ZL_Edge_runDispatchNode, which is the underlying\n component that this graph uses to actually decompose the input, for more\n information about the dispatch operation. These streams respectively are the\n first and second stream passed into the successor graph, and the streams\n into which the input has been dispatched follow, in order.)\n\n The streams on which the @p successor is invoked are also tagged with int\n metadata, with key 0 set to their index. (For the moment. Future work may\n allow for more robust/stable tagging.) This makes this graph compatible with\n the generic clustering graph (see @ref ZL_Clustering_registerGraph), and the\n `sddl` profile in the demo CLI, for example, is set up that way, with the\n SDDL graph succeeded by the generic clusterer.\n\n ### Data Description\n\n This graph requires a @p description of the input format that it is intended\n to parse and dispatch. SDDL has both a human-writeable description language\n and a binary, compiled representation of that language. This component only\n accepts descriptions in the binary format.\n\n Use @ref openzl::sddl::Compiler::compile to do that translation.\n\n Note that the OpenZL demo CLI can also compile SDDL descriptions, as part of\n using the `sddl` profile."]
2722    pub fn ZL_Compressor_buildSDDLGraph(
2723        compressor: *mut ZL_Compressor,
2724        description: *const ::std::os::raw::c_void,
2725        descriptionSize: usize,
2726        successor: ZL_GraphID,
2727    ) -> ZL_Result_ZL_GraphID;
2728}
2729extern "C" {
2730    pub fn ZL_Compressor_registerSplitNode_withParams(
2731        cgraph: *mut ZL_Compressor,
2732        type_: ZL_Type,
2733        segmentSizes: *const usize,
2734        nbSegments: usize,
2735    ) -> ZL_NodeID;
2736}
2737extern "C" {
2738    #[doc = " Run the SplitN node within the context of a dynamic graph,\n applying runtime-defined @p segmentSizes parameters.\n\n @returns the list of Streams created by the Transform\n or an error if the splitting process fails (invalid segment sizes or input\n type for example)"]
2739    pub fn ZL_Edge_runSplitNode(
2740        input: *mut ZL_Edge,
2741        segmentSizes: *const usize,
2742        nbSegments: usize,
2743    ) -> ZL_Result_ZL_EdgeList;
2744}
2745#[repr(C)]
2746#[derive(Debug, Copy, Clone)]
2747pub struct ZL_SplitInstructions {
2748    pub segmentSizes: *const usize,
2749    pub nbSegments: usize,
2750}
2751#[test]
2752fn bindgen_test_layout_ZL_SplitInstructions() {
2753    const UNINIT: ::std::mem::MaybeUninit<ZL_SplitInstructions> = ::std::mem::MaybeUninit::uninit();
2754    let ptr = UNINIT.as_ptr();
2755    assert_eq!(
2756        ::std::mem::size_of::<ZL_SplitInstructions>(),
2757        16usize,
2758        "Size of ZL_SplitInstructions"
2759    );
2760    assert_eq!(
2761        ::std::mem::align_of::<ZL_SplitInstructions>(),
2762        8usize,
2763        "Alignment of ZL_SplitInstructions"
2764    );
2765    assert_eq!(
2766        unsafe { ::std::ptr::addr_of!((*ptr).segmentSizes) as usize - ptr as usize },
2767        0usize,
2768        "Offset of field: ZL_SplitInstructions::segmentSizes"
2769    );
2770    assert_eq!(
2771        unsafe { ::std::ptr::addr_of!((*ptr).nbSegments) as usize - ptr as usize },
2772        8usize,
2773        "Offset of field: ZL_SplitInstructions::nbSegments"
2774    );
2775}
2776#[repr(C)]
2777#[derive(Debug, Copy, Clone)]
2778pub struct ZL_SplitState_s {
2779    _unused: [u8; 0],
2780}
2781pub type ZL_SplitState = ZL_SplitState_s;
2782extern "C" {
2783    pub fn ZL_SplitState_malloc(
2784        state: *mut ZL_SplitState,
2785        size: usize,
2786    ) -> *mut ::std::os::raw::c_void;
2787}
2788extern "C" {
2789    #[doc = " Provides an opaque pointer that can be useful to provide state to the parser.\n For example, it can be used by language bindings to allow parsers written in\n languages other than C.\n\n @returns The opaque pointer provided to @fn\n ZL_Compressor_registerSplitNode_withParser(). WARNING: ZStrong does not\n manage the lifetime of this pointer, it must outlive the ZL_Compressor."]
2790    pub fn ZL_SplitState_getOpaquePtr(state: *mut ZL_SplitState) -> *const ::std::os::raw::c_void;
2791}
2792pub type ZL_SplitParserFn = ::std::option::Option<
2793    unsafe extern "C" fn(state: *mut ZL_SplitState, in_: *const ZL_Input) -> ZL_SplitInstructions,
2794>;
2795extern "C" {
2796    pub fn ZL_Compressor_registerSplitNode_withParser(
2797        cgraph: *mut ZL_Compressor,
2798        type_: ZL_Type,
2799        f: ZL_SplitParserFn,
2800        opaque: *const ::std::os::raw::c_void,
2801    ) -> ZL_NodeID;
2802}
2803extern "C" {
2804    #[doc = " Split-by-param\n This operation splits a serialized input\n into segments, defined by array @segmentSizes[].\n The nb of segments and their size is static,\n except for the last segment size, which can receive a size value `0`,\n meaning \"whatever is left in the stream\".\n Each segment is then into its own output,\n and then sent to the next processing stage defined by @successors[]."]
2805    pub fn ZL_Compressor_registerSplitGraph(
2806        cgraph: *mut ZL_Compressor,
2807        type_: ZL_Type,
2808        segmentSizes: *const usize,
2809        successors: *const ZL_GraphID,
2810        nbSegments: usize,
2811    ) -> ZL_GraphID;
2812}
2813extern "C" {
2814    #[doc = " Split-by-struct\n This operation splits a serialized input\n defined as an array of structures of fixed size,\n by grouping same fields into their own stream.\n All fields are considered concatenated back-to-back (no alignment).\n For this transform to work, input must be an exact multiple of struct_size,\n with struct_size = sum(field_sizes).\n Each output stream is then assigned a successor Graph."]
2815    pub fn ZL_Compressor_registerSplitByStructGraph(
2816        cgraph: *mut ZL_Compressor,
2817        fieldSizes: *const usize,
2818        successors: *const ZL_GraphID,
2819        nbFields: usize,
2820    ) -> ZL_GraphID;
2821}
2822extern "C" {
2823    #[doc = " Builds a tokenize node for the given parameters.\n\n Input: @p inputType\n Output 0: @p inputType - alphabet of unique values\n Output 1: numeric - indices into the alphabet for each value\n\n @param inputType The type of the input data. It can be either struct,\n numeric, or string.\n @param sort Whether or not to sort the alphabet. Struct types cannot be\n sorted. Numeric types are sorted in ascending order. String types are sorted\n in lexographical order.\n\n @returns The tokenize node, or an error."]
2824    pub fn ZL_Compressor_parameterizeTokenizeNode(
2825        compressor: *mut ZL_Compressor,
2826        inputType: ZL_Type,
2827        sort: bool,
2828    ) -> ZL_Result_ZL_NodeID;
2829}
2830extern "C" {
2831    #[doc = " Builds a tokenize graph for the given parameters & successors.\n\n @note If sorting the alphabet is not beneficial avoid it, as the sort will\n slow down compression.\n\n @param inputType The type of the input data. It can be either struct,\n numeric, or string.\n @param sort Whether or not to sort the alphabet. Struct types cannot be\n sorted. Numeric types are sorted in ascending order. String types are sorted\n in lexographical order.\n @param alphabetGraph The graph to pass the alphabet output to. It must accept\n an input of type @p inputType.\n @param indicesGraph The graph to pass the indices to. It must accept a\n numeric input.\n\n @returns The tokenize graph, or an error."]
2832    pub fn ZL_Compressor_buildTokenizeGraph(
2833        compressor: *mut ZL_Compressor,
2834        inputType: ZL_Type,
2835        sort: bool,
2836        alphabetGraph: ZL_GraphID,
2837        indicesGraph: ZL_GraphID,
2838    ) -> ZL_Result_ZL_GraphID;
2839}
2840extern "C" {
2841    #[doc = " @see ZL_Compressor_buildTokenizeGraph\n @returns The tokenize graph, or ZL_GRAPH_ILLEGAL on error."]
2842    pub fn ZL_Compressor_registerTokenizeGraph(
2843        compressor: *mut ZL_Compressor,
2844        inputType: ZL_Type,
2845        sort: bool,
2846        alphabetGraph: ZL_GraphID,
2847        indicesGraph: ZL_GraphID,
2848    ) -> ZL_GraphID;
2849}
2850#[repr(C)]
2851#[derive(Debug, Copy, Clone)]
2852pub struct ZL_CustomTokenizeState_s {
2853    _unused: [u8; 0],
2854}
2855pub type ZL_CustomTokenizeState = ZL_CustomTokenizeState_s;
2856extern "C" {
2857    #[doc = " @returns The opaque pointer passed into @fn ZS2_createGraph_customTokenize()."]
2858    pub fn ZL_CustomTokenizeState_getOpaquePtr(
2859        ctx: *const ZL_CustomTokenizeState,
2860    ) -> *const ::std::os::raw::c_void;
2861}
2862extern "C" {
2863    #[doc = " Creates the alphabet stream to store the tokenized alphabet. The width of\n each element in the alphabet must be the same width as the input stream.\n\n @param alphabetSize The exact size of the alphabet.\n\n @returns A pointer to write the alphabet into or NULL on error."]
2864    pub fn ZL_CustomTokenizeState_createAlphabetOutput(
2865        ctx: *mut ZL_CustomTokenizeState,
2866        alphabetSize: usize,
2867    ) -> *mut ::std::os::raw::c_void;
2868}
2869extern "C" {
2870    #[doc = " Creates the index stream with the given width. The index stream must contain\n exactly the same number of elements as the input.\n\n @param indexWidth The width of the index integer, either 1, 2, 4, or 8.\n\n @returns A pointer to write the indices into or NULL on error."]
2871    pub fn ZL_CustomTokenizeState_createIndexOutput(
2872        ctx: *mut ZL_CustomTokenizeState,
2873        indexWidth: usize,
2874    ) -> *mut ::std::os::raw::c_void;
2875}
2876#[doc = " A custom tokenization function to tokenize the input. The output of this\n function is not checked in production builds, and it is UB to tokenize\n incorrectly."]
2877pub type ZL_CustomTokenizeFn = ::std::option::Option<
2878    unsafe extern "C" fn(ctx: *mut ZL_CustomTokenizeState, input: *const ZL_Input) -> ZL_Report,
2879>;
2880extern "C" {
2881    #[doc = " Tokenize with a custom tokenization function. This is useful if you want to\n define a custom order for your alphabet that is neither insertion nor sorted\n order.\n\n WARNING: Zstrong does not manage the lifetime of the @p opaque pointer. It\n must outlive the @p cgraph or be NULL."]
2882    pub fn ZL_Compressor_registerCustomTokenizeGraph(
2883        cgraph: *mut ZL_Compressor,
2884        streamType: ZL_Type,
2885        customTokenizeFn: ZL_CustomTokenizeFn,
2886        opaque: *const ::std::os::raw::c_void,
2887        alphabetGraph: ZL_GraphID,
2888        indicesGraph: ZL_GraphID,
2889    ) -> ZL_GraphID;
2890}
2891extern "C" {
2892    #[doc = " Helper function to create a graph for ZL_NODE_TRANSPOSE_SPLIT.\n\n For frame format versions >= 11 ZL_NODE_TRANSPOSE_SPLIT is used and\n any eltWidth is supported.\n For frame format versions < 11 only eltWidth = 1, 2, 4, 8 is supported.\n Using other sizes will fail compression.\n\n Input: A fixed-size-field stream\n Output: eltWidth serialized streams of size nbElts\n Result: Convert a stream of N fields of size S into S streams of N fields by\n transposing the input stream.\n Example : 1 2 3 4 5 6 7 8 as 2 fields of size 4\n           => transposed into 4 streams as 2 fields of size 1\n           => (1, 5), (2, 6), (3, 7), (4, 8)"]
2893    pub fn ZL_Compressor_registerTransposeSplitGraph(
2894        cgraph: *mut ZL_Compressor,
2895        successor: ZL_GraphID,
2896    ) -> ZL_GraphID;
2897}
2898extern "C" {
2899    #[doc = " @returns a NodeID that implements transpose split for the given @p eltWidth\n that will work with any Zstrong format version. If no node exists, then\n returns ZL_NODE_ILLEGAL. This can happen for format version <= 10 when\n @p eltWidth != 2,4,8."]
2900    pub fn ZL_Graph_getTransposeSplitNode(gctx: *const ZL_Graph, eltWidth: usize) -> ZL_NodeID;
2901}
2902extern "C" {
2903    pub fn ZL_Edge_runTransposeSplit(
2904        edge: *mut ZL_Edge,
2905        graph: *const ZL_Graph,
2906    ) -> ZL_Result_ZL_EdgeList;
2907}
2908extern "C" {
2909    #[doc = " @return zstd graph with a compression level overridden"]
2910    pub fn ZL_Compressor_registerZstdGraph_withLevel(
2911        cgraph: *mut ZL_Compressor,
2912        compressionLevel: ::std::os::raw::c_int,
2913    ) -> ZL_GraphID;
2914}
2915extern "C" {
2916    #[doc = " @brief Create a new @ref ZL_Compressor.\n\n The @ref ZL_Compressor must be freed with @ref ZL_Compressor_free.\n\n @returns The @ref ZL_Compressor pointer or `NULL` on error."]
2917    pub fn ZL_Compressor_create() -> *mut ZL_Compressor;
2918}
2919extern "C" {
2920    #[doc = " @brief Frees a @ref ZL_Compressor.\n\n If @p compressor is `NULL` this function does nothing.\n\n @param compressor The @ref ZL_Compressor to free or `NULL`."]
2921    pub fn ZL_Compressor_free(compressor: *mut ZL_Compressor);
2922}
2923extern "C" {
2924    #[doc = " @returns A verbose error string containing context about the error that\n occurred. This is useful for debugging, and for submitting bug reports to\n OpenZL developers.\n @note This string is stored within the @p compressor and is only valid for\n the lifetime of the @p compressor."]
2925    pub fn ZL_Compressor_getErrorContextString(
2926        compressor: *const ZL_Compressor,
2927        report: ZL_Report,
2928    ) -> *const ::std::os::raw::c_char;
2929}
2930extern "C" {
2931    #[doc = " See @ref ZL_Compressor_getErrorContextString()\n\n The same as ZL_Compressor_getErrorContextString() except works on a @ref\n ZL_Error."]
2932    pub fn ZL_Compressor_getErrorContextString_fromError(
2933        compressor: *const ZL_Compressor,
2934        error: ZL_Error,
2935    ) -> *const ::std::os::raw::c_char;
2936}
2937extern "C" {
2938    #[doc = " @returns The array of warnings that were encountered during the creation\n of the compressor.\n @note The array's and the errors' lifetimes are valid until the next non-\n const call on the compressor."]
2939    pub fn ZL_Compressor_getWarnings(compressor: *const ZL_Compressor) -> ZL_Error_Array;
2940}
2941extern "C" {
2942    #[doc = " @brief Set global parameters via @p compressor. In this construction, global\n parameters are attached to a Compressor object. Global Parameters set at\n Compressor level can be overridden later at CCtx level.\n\n @returns Success or an error which can be checked with ZL_isError().\n @param gcparam The global parameter to set.\n @param value The value to set for the global parameter."]
2943    pub fn ZL_Compressor_setParameter(
2944        compresor: *mut ZL_Compressor,
2945        gcparam: ZL_CParam,
2946        value: ::std::os::raw::c_int,
2947    ) -> ZL_Report;
2948}
2949extern "C" {
2950    #[doc = " @brief Read a parameter's configured value in the Compressor and returns it.\n\n @returns Returns the value of the parameter if it is set, or 0 if unset.\n @param gcparam The global parameter to read."]
2951    pub fn ZL_Compressor_getParameter(
2952        compressor: *const ZL_Compressor,
2953        gcparam: ZL_CParam,
2954    ) -> ::std::os::raw::c_int;
2955}
2956#[doc = " @defgroup Group_Compressor_StaticGraphCreation Static Graph Creation\n\n There are two types of graphs in OpenZL: static graphs and dynamic graphs.\n Static graphs take a single input, pass that input to a codec, and the\n outputs of that codec are sent to the successor graphs. Dynamic graphs are\n graphs that inspect the input at runtime to make different decisions. These\n are either function graphs or selectors.\n\n This API allows the construction of static graphs. The head node and the\n successor graphs must be specified. Additionally, a name can be provided for\n the graph, which can aid in debugging. Finally, the graph can be\n parameterized, which sends the local parameters to the head node.\n\n The main function is @ref ZL_Compressor_buildStaticGraph. The other functions\n are older variants that will eventually be removed.\n @{"]
2957#[repr(C)]
2958#[derive(Debug, Copy, Clone)]
2959pub struct ZL_StaticGraphParameters {
2960    #[doc = " Optionally a name for the graph for debugging.\n If NULL, then the static graph will not have a name."]
2961    pub name: *const ::std::os::raw::c_char,
2962    #[doc = " Optionally local parameters to pass to the head node.\n If NULL, then the head node's local parameters will not be overridden."]
2963    pub localParams: *const ZL_LocalParams,
2964}
2965#[test]
2966fn bindgen_test_layout_ZL_StaticGraphParameters() {
2967    const UNINIT: ::std::mem::MaybeUninit<ZL_StaticGraphParameters> =
2968        ::std::mem::MaybeUninit::uninit();
2969    let ptr = UNINIT.as_ptr();
2970    assert_eq!(
2971        ::std::mem::size_of::<ZL_StaticGraphParameters>(),
2972        16usize,
2973        "Size of ZL_StaticGraphParameters"
2974    );
2975    assert_eq!(
2976        ::std::mem::align_of::<ZL_StaticGraphParameters>(),
2977        8usize,
2978        "Alignment of ZL_StaticGraphParameters"
2979    );
2980    assert_eq!(
2981        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
2982        0usize,
2983        "Offset of field: ZL_StaticGraphParameters::name"
2984    );
2985    assert_eq!(
2986        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
2987        8usize,
2988        "Offset of field: ZL_StaticGraphParameters::localParams"
2989    );
2990}
2991extern "C" {
2992    #[doc = " Build a new graph out of pre-existing components. The new graph passes its\n data to @p headNode, and then each output of @p headNode is set to the\n corresponding @p successorGraph.\n\n @param headNode Pass the input data to this node\n @param successorGraphs Pass the outputs of @p headNode to these graphs\n @param numSuccessorGraphs Number of successor graphs\n @param params Optionally extra parameters for the static graph, or NULL.\n\n @returns Thew new graph ID, or an error."]
2993    pub fn ZL_Compressor_buildStaticGraph(
2994        compressor: *mut ZL_Compressor,
2995        headNode: ZL_NodeID,
2996        successorGraphs: *const ZL_GraphID,
2997        numSuccessorGraphs: usize,
2998        params: *const ZL_StaticGraphParameters,
2999    ) -> ZL_Result_ZL_GraphID;
3000}
3001extern "C" {
3002    #[doc = " @brief Create a graph from a single input & output node.\n\n Simplified variant of @ref ZL_Compressor_registerStaticGraph_fromNode that\n only works for nodes that have one input and one output. Creates a new graph\n headed by\n @p headNode, whose output gets sent to @p dstGraph.\n\n @returns The newly created graph or `ZL_GRAPH_ILLEGAL` on error.\n The user may check for errors using ZL_GraphID_isValid().\n\n @param headNode The node executed first in the newly created graph.\n @param dstGraph The graph that will receive the output of @p headNode."]
3003    pub fn ZL_Compressor_registerStaticGraph_fromNode1o(
3004        compressor: *mut ZL_Compressor,
3005        headNode: ZL_NodeID,
3006        dstGraph: ZL_GraphID,
3007    ) -> ZL_GraphID;
3008}
3009extern "C" {
3010    #[doc = " @brief Creates a graph consisting of a series of nodes executed in succession\n in the order provided and then sent to @p dstGraph.\n\n @returns The newly created graph or `ZL_GRAPH_ILLEGAL` on error.\n The user may check for errors using ZL_GraphID_isValid().\n\n @param nodes The nodes to execute in the newly created graph.\n @param nbNodes The number of nodes in @p nodes.\n @param dstGraph The graph that will receive the output of the last node in @p\n nodes."]
3011    pub fn ZL_Compressor_registerStaticGraph_fromPipelineNodes1o(
3012        compressor: *mut ZL_Compressor,
3013        nodes: *const ZL_NodeID,
3014        nbNodes: usize,
3015        dstGraph: ZL_GraphID,
3016    ) -> ZL_GraphID;
3017}
3018extern "C" {
3019    #[doc = " @brief Create a graph from a head node.\n\n Creates a new graph headed by @p headNode, which produces\n @p nbDstGraphs outcomes. Each outcome of @p headNode gets sent\n to the corresponding graph in @p dstGraphs.\n\n @param headNode The head node in the newly created graph.\n @param dstGraphs Array of graphs of size @p nbDstGraphs.\n @param nbDstGraphs Must be equal to the number of outputs of @p headNode.\n\n @returns The newly created graph or `ZL_GRAPH_ILLEGAL` on error.\n The user may check for errors using ZL_GraphID_isValid().\n\n @note Successor dstGraphs can only be employed in single-input mode.\n Multi-input Graphs can only be invoked from a function graph."]
3020    pub fn ZL_Compressor_registerStaticGraph_fromNode(
3021        compressor: *mut ZL_Compressor,
3022        headNode: ZL_NodeID,
3023        dstGraphs: *const ZL_GraphID,
3024        nbDstGraphs: usize,
3025    ) -> ZL_GraphID;
3026}
3027#[repr(C)]
3028#[derive(Debug, Copy, Clone)]
3029pub struct ZL_StaticGraphDesc {
3030    pub name: *const ::std::os::raw::c_char,
3031    pub headNodeid: ZL_NodeID,
3032    pub successor_gids: *const ZL_GraphID,
3033    pub nbGids: usize,
3034    pub localParams: *const ZL_LocalParams,
3035}
3036#[test]
3037fn bindgen_test_layout_ZL_StaticGraphDesc() {
3038    const UNINIT: ::std::mem::MaybeUninit<ZL_StaticGraphDesc> = ::std::mem::MaybeUninit::uninit();
3039    let ptr = UNINIT.as_ptr();
3040    assert_eq!(
3041        ::std::mem::size_of::<ZL_StaticGraphDesc>(),
3042        40usize,
3043        "Size of ZL_StaticGraphDesc"
3044    );
3045    assert_eq!(
3046        ::std::mem::align_of::<ZL_StaticGraphDesc>(),
3047        8usize,
3048        "Alignment of ZL_StaticGraphDesc"
3049    );
3050    assert_eq!(
3051        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
3052        0usize,
3053        "Offset of field: ZL_StaticGraphDesc::name"
3054    );
3055    assert_eq!(
3056        unsafe { ::std::ptr::addr_of!((*ptr).headNodeid) as usize - ptr as usize },
3057        8usize,
3058        "Offset of field: ZL_StaticGraphDesc::headNodeid"
3059    );
3060    assert_eq!(
3061        unsafe { ::std::ptr::addr_of!((*ptr).successor_gids) as usize - ptr as usize },
3062        16usize,
3063        "Offset of field: ZL_StaticGraphDesc::successor_gids"
3064    );
3065    assert_eq!(
3066        unsafe { ::std::ptr::addr_of!((*ptr).nbGids) as usize - ptr as usize },
3067        24usize,
3068        "Offset of field: ZL_StaticGraphDesc::nbGids"
3069    );
3070    assert_eq!(
3071        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
3072        32usize,
3073        "Offset of field: ZL_StaticGraphDesc::localParams"
3074    );
3075}
3076extern "C" {
3077    #[doc = " This is the more complete declaration variant, offering more control and\n capabilities.\n In order to be valid, a Static Graph Description must :\n - provide exactly as many successors as nb of outcomes defined by head Node\n - only employ single-input Graphs as successors\n - match each outcome type with a successor using a compatible input type\n - optionally, can specify @localParams for a Static Graph. In this case,\n   these parameters are forwarded to the Head Node, replacing any previous\n   local parameter that may have been already set on the Head Node.\n\n If a declaration is invalid, it results in an invalid GraphID, which can be\n tested using ZL_GraphID_isValid() on the return value.\n Note: ZL_GraphID_isValid() is currently defined in zs2_graph_api.h."]
3078    pub fn ZL_Compressor_registerStaticGraph(
3079        compressor: *mut ZL_Compressor,
3080        sgDesc: *const ZL_StaticGraphDesc,
3081    ) -> ZL_GraphID;
3082}
3083#[doc = " @defgroup Group_Compressor_NodeCustomization Node Customization\n\n Nodes can be customized to override their name and local parameters.\n This is an advanced use case, and mainly an implementation detail of nodes.\n Most nodes that accept parameters provide helper functions to correctly\n parameterize the node.\n\n @{"]
3084#[repr(C)]
3085#[derive(Debug, Copy, Clone)]
3086pub struct ZL_NodeParameters {
3087    #[doc = " Optionally a new name, if NULL it is derived from the node's name"]
3088    pub name: *const ::std::os::raw::c_char,
3089    #[doc = " Optionally the new local params, if NULL then the parameters are not\n updated."]
3090    pub localParams: *const ZL_LocalParams,
3091}
3092#[test]
3093fn bindgen_test_layout_ZL_NodeParameters() {
3094    const UNINIT: ::std::mem::MaybeUninit<ZL_NodeParameters> = ::std::mem::MaybeUninit::uninit();
3095    let ptr = UNINIT.as_ptr();
3096    assert_eq!(
3097        ::std::mem::size_of::<ZL_NodeParameters>(),
3098        16usize,
3099        "Size of ZL_NodeParameters"
3100    );
3101    assert_eq!(
3102        ::std::mem::align_of::<ZL_NodeParameters>(),
3103        8usize,
3104        "Alignment of ZL_NodeParameters"
3105    );
3106    assert_eq!(
3107        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
3108        0usize,
3109        "Offset of field: ZL_NodeParameters::name"
3110    );
3111    assert_eq!(
3112        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
3113        8usize,
3114        "Offset of field: ZL_NodeParameters::localParams"
3115    );
3116}
3117extern "C" {
3118    #[doc = " Parameterize an existing node by overriding its name and/or local parameters.\n\n @param node The node to parameterize.\n @param params The new parameters, which must be non-null.\n\n @returns The new node ID on success, or an error."]
3119    pub fn ZL_Compressor_parameterizeNode(
3120        compressor: *mut ZL_Compressor,
3121        node: ZL_NodeID,
3122        params: *const ZL_NodeParameters,
3123    ) -> ZL_Result_ZL_NodeID;
3124}
3125#[repr(C)]
3126#[derive(Debug, Copy, Clone)]
3127pub struct ZL_ParameterizedNodeDesc {
3128    #[doc = " Optionally a new name, if NULL it is derived from the node's name"]
3129    pub name: *const ::std::os::raw::c_char,
3130    #[doc = " Node to parameterize"]
3131    pub node: ZL_NodeID,
3132    #[doc = " Optionally the new local params, if NULL then the parameters are not\n updated."]
3133    pub localParams: *const ZL_LocalParams,
3134}
3135#[test]
3136fn bindgen_test_layout_ZL_ParameterizedNodeDesc() {
3137    const UNINIT: ::std::mem::MaybeUninit<ZL_ParameterizedNodeDesc> =
3138        ::std::mem::MaybeUninit::uninit();
3139    let ptr = UNINIT.as_ptr();
3140    assert_eq!(
3141        ::std::mem::size_of::<ZL_ParameterizedNodeDesc>(),
3142        24usize,
3143        "Size of ZL_ParameterizedNodeDesc"
3144    );
3145    assert_eq!(
3146        ::std::mem::align_of::<ZL_ParameterizedNodeDesc>(),
3147        8usize,
3148        "Alignment of ZL_ParameterizedNodeDesc"
3149    );
3150    assert_eq!(
3151        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
3152        0usize,
3153        "Offset of field: ZL_ParameterizedNodeDesc::name"
3154    );
3155    assert_eq!(
3156        unsafe { ::std::ptr::addr_of!((*ptr).node) as usize - ptr as usize },
3157        8usize,
3158        "Offset of field: ZL_ParameterizedNodeDesc::node"
3159    );
3160    assert_eq!(
3161        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
3162        16usize,
3163        "Offset of field: ZL_ParameterizedNodeDesc::localParams"
3164    );
3165}
3166extern "C" {
3167    #[doc = " @brief Clone an existing @ref ZL_NodeID from an existing node, but\n optionally with a new name & new parameters.\n\n @param desc The parameterization options.\n\n @returns The new node id of the cloned node."]
3168    pub fn ZL_Compressor_registerParameterizedNode(
3169        compressor: *mut ZL_Compressor,
3170        desc: *const ZL_ParameterizedNodeDesc,
3171    ) -> ZL_NodeID;
3172}
3173extern "C" {
3174    #[doc = " @brief Simplified variant of @ref ZL_Compressor_registerParameterizedNode().\n Clone an existing @ref ZL_NodeID from an already registered\n @p nodeid but employs new parameters, set via @p localParams.\n\n @returns The new node id of the cloned node.\n\n @param nodeid The node to clone.\n @param localParams The local parameters to use for the node."]
3175    pub fn ZL_Compressor_cloneNode(
3176        compressor: *mut ZL_Compressor,
3177        nodeid: ZL_NodeID,
3178        localParams: *const ZL_LocalParams,
3179    ) -> ZL_NodeID;
3180}
3181#[doc = " @defgroup Group_Compressor_GraphCustomization Graph Customization\n\n Graphs can be customized to override their name, local parameters, custom\n nodes and custom graphs. This is an advanced use case, and mainly an\n implementation detail of graphs. Most graphs which accept parameters provide\n helper functions to correctly parameterize the graph.\n\n @{"]
3182#[repr(C)]
3183#[derive(Debug, Copy, Clone)]
3184pub struct ZL_GraphParameters_s {
3185    #[doc = " Optional, for debug traces, otherwise it is derived from graph's name."]
3186    pub name: *const ::std::os::raw::c_char,
3187    #[doc = " Empty means don't override"]
3188    pub customGraphs: *const ZL_GraphID,
3189    pub nbCustomGraphs: usize,
3190    #[doc = " Empty means don't override"]
3191    pub customNodes: *const ZL_NodeID,
3192    pub nbCustomNodes: usize,
3193    #[doc = " NULL means don't override"]
3194    pub localParams: *const ZL_LocalParams,
3195}
3196#[test]
3197fn bindgen_test_layout_ZL_GraphParameters_s() {
3198    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphParameters_s> = ::std::mem::MaybeUninit::uninit();
3199    let ptr = UNINIT.as_ptr();
3200    assert_eq!(
3201        ::std::mem::size_of::<ZL_GraphParameters_s>(),
3202        48usize,
3203        "Size of ZL_GraphParameters_s"
3204    );
3205    assert_eq!(
3206        ::std::mem::align_of::<ZL_GraphParameters_s>(),
3207        8usize,
3208        "Alignment of ZL_GraphParameters_s"
3209    );
3210    assert_eq!(
3211        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
3212        0usize,
3213        "Offset of field: ZL_GraphParameters_s::name"
3214    );
3215    assert_eq!(
3216        unsafe { ::std::ptr::addr_of!((*ptr).customGraphs) as usize - ptr as usize },
3217        8usize,
3218        "Offset of field: ZL_GraphParameters_s::customGraphs"
3219    );
3220    assert_eq!(
3221        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomGraphs) as usize - ptr as usize },
3222        16usize,
3223        "Offset of field: ZL_GraphParameters_s::nbCustomGraphs"
3224    );
3225    assert_eq!(
3226        unsafe { ::std::ptr::addr_of!((*ptr).customNodes) as usize - ptr as usize },
3227        24usize,
3228        "Offset of field: ZL_GraphParameters_s::customNodes"
3229    );
3230    assert_eq!(
3231        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomNodes) as usize - ptr as usize },
3232        32usize,
3233        "Offset of field: ZL_GraphParameters_s::nbCustomNodes"
3234    );
3235    assert_eq!(
3236        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
3237        40usize,
3238        "Offset of field: ZL_GraphParameters_s::localParams"
3239    );
3240}
3241#[doc = " @defgroup Group_Compressor_GraphCustomization Graph Customization\n\n Graphs can be customized to override their name, local parameters, custom\n nodes and custom graphs. This is an advanced use case, and mainly an\n implementation detail of graphs. Most graphs which accept parameters provide\n helper functions to correctly parameterize the graph.\n\n @{"]
3242pub type ZL_GraphParameters = ZL_GraphParameters_s;
3243extern "C" {
3244    #[doc = " Parameterizes an existing graph by overriding its name, customGraphs,\n customNodes, and/or localParams.\n\n @param graph The graph to parameterize.\n @param params The new parameters, which must be non-null.\n\n @returns The new graph ID on success, or an error."]
3245    pub fn ZL_Compressor_parameterizeGraph(
3246        compressor: *mut ZL_Compressor,
3247        graph: ZL_GraphID,
3248        params: *const ZL_GraphParameters,
3249    ) -> ZL_Result_ZL_GraphID;
3250}
3251#[doc = " This creates a new Graphs, based on an existing Graph,\n but modifying all or parts of its exposed parameters."]
3252#[repr(C)]
3253#[derive(Debug, Copy, Clone)]
3254pub struct ZL_ParameterizedGraphDesc {
3255    #[doc = " Optionally a new name, otherwise it is derived from `graph`'s name."]
3256    pub name: *const ::std::os::raw::c_char,
3257    pub graph: ZL_GraphID,
3258    #[doc = " Empty means don't override"]
3259    pub customGraphs: *const ZL_GraphID,
3260    pub nbCustomGraphs: usize,
3261    #[doc = " Empty means don't override"]
3262    pub customNodes: *const ZL_NodeID,
3263    pub nbCustomNodes: usize,
3264    #[doc = " NULL means don't override"]
3265    pub localParams: *const ZL_LocalParams,
3266}
3267#[test]
3268fn bindgen_test_layout_ZL_ParameterizedGraphDesc() {
3269    const UNINIT: ::std::mem::MaybeUninit<ZL_ParameterizedGraphDesc> =
3270        ::std::mem::MaybeUninit::uninit();
3271    let ptr = UNINIT.as_ptr();
3272    assert_eq!(
3273        ::std::mem::size_of::<ZL_ParameterizedGraphDesc>(),
3274        56usize,
3275        "Size of ZL_ParameterizedGraphDesc"
3276    );
3277    assert_eq!(
3278        ::std::mem::align_of::<ZL_ParameterizedGraphDesc>(),
3279        8usize,
3280        "Alignment of ZL_ParameterizedGraphDesc"
3281    );
3282    assert_eq!(
3283        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
3284        0usize,
3285        "Offset of field: ZL_ParameterizedGraphDesc::name"
3286    );
3287    assert_eq!(
3288        unsafe { ::std::ptr::addr_of!((*ptr).graph) as usize - ptr as usize },
3289        8usize,
3290        "Offset of field: ZL_ParameterizedGraphDesc::graph"
3291    );
3292    assert_eq!(
3293        unsafe { ::std::ptr::addr_of!((*ptr).customGraphs) as usize - ptr as usize },
3294        16usize,
3295        "Offset of field: ZL_ParameterizedGraphDesc::customGraphs"
3296    );
3297    assert_eq!(
3298        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomGraphs) as usize - ptr as usize },
3299        24usize,
3300        "Offset of field: ZL_ParameterizedGraphDesc::nbCustomGraphs"
3301    );
3302    assert_eq!(
3303        unsafe { ::std::ptr::addr_of!((*ptr).customNodes) as usize - ptr as usize },
3304        32usize,
3305        "Offset of field: ZL_ParameterizedGraphDesc::customNodes"
3306    );
3307    assert_eq!(
3308        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomNodes) as usize - ptr as usize },
3309        40usize,
3310        "Offset of field: ZL_ParameterizedGraphDesc::nbCustomNodes"
3311    );
3312    assert_eq!(
3313        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
3314        48usize,
3315        "Offset of field: ZL_ParameterizedGraphDesc::localParams"
3316    );
3317}
3318extern "C" {
3319    #[doc = " @brief Create a new GraphID by the one from @p gid,\n just replacing the @p localParams by the provided ones. Used to create\n custom variants of Standard Graphs for example.\n\n @note the original @gid still exists and remains accessible.\n @note @localParams==NULL means \"do not change the parameters\",\n       in which case, this function simply returns @gid.\n\n @return The GraphID of the newly created graph, or ZL_GRAPH_ILLEGAL on\n error.\n\n @param gid The GraphID to clone.\n @param localParams The local parameters to use inside the graph."]
3320    pub fn ZL_Compressor_registerParameterizedGraph(
3321        compressor: *mut ZL_Compressor,
3322        desc: *const ZL_ParameterizedGraphDesc,
3323    ) -> ZL_GraphID;
3324}
3325extern "C" {
3326    #[doc = " @brief Lookup a node by name.\n\n Looks up a node with the given name and returns it. Anchor nodes (nodes whose\n name starts with '!') can be looked up by name, excluding the leading '!'.\n Standard nodes can also be looked up by name. Non-anchor nodes are assigned a\n unique name by suffixing them with `#${unique}`. They can be looked up if you\n know the unique name.\n\n @returns The node if it exists, or ZL_NODE_ILLEGAL."]
3327    pub fn ZL_Compressor_getNode(
3328        compressor: *const ZL_Compressor,
3329        name: *const ::std::os::raw::c_char,
3330    ) -> ZL_NodeID;
3331}
3332extern "C" {
3333    #[doc = " @brief Lookup a graph by name.\n\n Looks up a graph with the given name and returns it. Anchor graphs (graphs\n whose name starts with '!') can be looked up by name, excluding the leading\n '!'. Standard graphs can also be looked up by name. Non-anchor graphs are\n assigned a unique name by suffixing them with `#${unique}`. They can be\n looked up if you know the unique name.\n\n @returns The graph if it exists, or ZL_GRAPH_ILLEGAL."]
3334    pub fn ZL_Compressor_getGraph(
3335        compressor: *const ZL_Compressor,
3336        graph: *const ::std::os::raw::c_char,
3337    ) -> ZL_GraphID;
3338}
3339extern "C" {
3340    #[doc = " @brief Selects a graph as the default entry point for the compressor.\n\n By default, a compressor's entry point is its most recently registered graph.\n This function allows explicit selection of a different graph as the default\n entry point for subsequent compression operations.\n\n @param compressor The compressor instance to configure. Must not be NULL.\n @param graph The graph ID to set as the default entry point. Must be a valid\n              graph ID that has been registered with this compressor.\n @returns ZL_Report indicating success or failure. Use ZL_isError() to check\n          for errors.\n\n @note The compressor can still be used as a collection of multiple entry\n points. Alternative entry points can be selected at runtime using\n       ZL_CCtx_selectStartingGraphID().\n @note This operation automatically validates the compressor by calling\n       ZL_Compressor_validate() internally.\n\n See ZL_CCtx_selectStartingGraphID() for runtime entry point selection"]
3341    pub fn ZL_Compressor_selectStartingGraphID(
3342        compressor: *mut ZL_Compressor,
3343        graph: ZL_GraphID,
3344    ) -> ZL_Report;
3345}
3346extern "C" {
3347    #[doc = " @brief Validates a graph maintains basic invariants to reduce the chance of\n errors being triggered when compressing.\n\n @note this operation is also integrated as part of\n ZL_Compressor_selectStartingGraphID(). This function is kept for backward\n compatibility.\n\n @returns Success if graph is valid, error otherwise.\n @param starting_graph The starting graph to validate."]
3348    pub fn ZL_Compressor_validate(
3349        compressor: *mut ZL_Compressor,
3350        starting_graph: ZL_GraphID,
3351    ) -> ZL_Report;
3352}
3353extern "C" {
3354    #[doc = " @brief Pass @p compressor as a `ZL_Compressor*` object to the compression\n state. Compression will start with the default Starting GraphID of @p\n compressor, using its default parameters provided at registration time.\n @note Only one compressor can be referenced at a time.\n       Referencing a new compressor deletes previous reference.\n @note If a custom GraphID and parameters were previously set,\n       invoking this method will reset them to default.\n @pre @p compressor must remain valid for the duration of its usage.\n @pre @p compressor must be already validated."]
3355    pub fn ZL_CCtx_refCompressor(cctx: *mut ZL_CCtx, compressor: *const ZL_Compressor)
3356        -> ZL_Report;
3357}
3358extern "C" {
3359    #[doc = " @brief Set the starting Graph of next compression,\n as @p graphID referenced in the provided @p compressor,\n optionally providing it with some runtime parameters.\n @pre @p compressor must remain valid for the duration of its usage.\n @pre @p compressor must be already validated.\n\n @param cctx The active compression state\n @param compressor The reference compressor containing graph definitions.\n                   If NULL, it uses the currently registered compressor.\n @param graphID The ID of the starting graph.\n @param rgp Optional parameters to apply to the starting graph.\n            NULL means don't override.\n\n Note: like all global parameters, these parameters are reset at end of\n compression."]
3360    pub fn ZL_CCtx_selectStartingGraphID(
3361        cctx: *mut ZL_CCtx,
3362        compressor: *const ZL_Compressor,
3363        graphID: ZL_GraphID,
3364        rgp: *const ZL_GraphParameters,
3365    ) -> ZL_Report;
3366}
3367#[doc = " @brief While it's possible to add elements (graphs, selectors or nodes) to a\n Compressor one by one, and then finalize it by selecting a starting graph ID,\n it's generally common for all these steps to be regrouped into a single\n initialization function.\n The following signature corresponds such a function.\n It returns a GraphID which, by convention, is the starting GraphID."]
3368pub type ZL_GraphFn =
3369    ::std::option::Option<unsafe extern "C" fn(compressor: *mut ZL_Compressor) -> ZL_GraphID>;
3370extern "C" {
3371    #[doc = " @brief Initialize a @p compressor object with a `ZL_GraphFn` Graph function\n @p f. It will register a few custom graphs and custom nodes, and set the\n starting Graph ID. This is a convenience function, which is equivalent to\n calling the Graph function, then ZL_Compressor_selectStartingGraphID()\n followed by ZL_Compressor_validate()\n @returns Success or an error which can be checked with ZL_isError().\n @param f The function used to build the `ZL_GraphID`."]
3372    pub fn ZL_Compressor_initUsingGraphFn(
3373        compressor: *mut ZL_Compressor,
3374        f: ZL_GraphFn,
3375    ) -> ZL_Report;
3376}
3377extern "C" {
3378    pub fn ZL_compress_usingCompressor(
3379        dst: *mut ::std::os::raw::c_void,
3380        dstCapacity: usize,
3381        src: *const ::std::os::raw::c_void,
3382        srcSize: usize,
3383        compressor: *const ZL_Compressor,
3384    ) -> ZL_Report;
3385}
3386extern "C" {
3387    #[doc = " @brief compresses using @param graphFunction that both defines a custom graph\n and sets global parameters."]
3388    pub fn ZL_compress_usingGraphFn(
3389        dst: *mut ::std::os::raw::c_void,
3390        dstCapacity: usize,
3391        src: *const ::std::os::raw::c_void,
3392        srcSize: usize,
3393        graphFunction: ZL_GraphFn,
3394    ) -> ZL_Report;
3395}
3396extern "C" {
3397    #[doc = " Creates and initializes an opaque `ZL_CompressorSerializer` object.\n\n Currently, this object can only be used for a single call to @ref\n ZL_CompressorSerializer_serialize(). You need to create a new serializer\n for every serialization you want to do.\n\n This will likely be improved in the future; it shouldn't be too hard to do.\n\n @returns the created `ZL_CompressorSerializer` if successful. Otherwise,\n          returns `NULL`."]
3398    pub fn ZL_CompressorSerializer_create() -> *mut ZL_CompressorSerializer;
3399}
3400extern "C" {
3401    #[doc = " Frees all the resources owned by the @p serializer, including the @p\n serializer itself."]
3402    pub fn ZL_CompressorSerializer_free(serializer: *mut ZL_CompressorSerializer);
3403}
3404extern "C" {
3405    #[doc = " Returns a serialized representation of the given @p compressor.\n\n See the documentation above for a description of how compressors must be\n structured to be compressible.\n\n This function uses @p dst and @dstSize both as (1) input arguments that\n optionally indicate an existing buffer into which the output of the\n serialization process can be placed as well as (2) output arguments\n indicating where the output actually was placed.\n\n When @p dst points to a `void*` variable with a non-`NULL` initial value,\n and @p dstSize points to a `size_t` variable with a non-zero initial value,\n this function will attempt to write the serialized output into the buffer\n pointed to by `*dst` with capacity `*dstSize`. If the output fits in that\n provided buffer, then `*dst` will be left unchanged, and `*dstSize` will be\n updated to reflect the written size of the output.\n\n Otherwise, either because the output doesn't fit in the provided buffer or\n because no buffer was provided (`*dst` is `NULL` or `*dstSize == 0`), an\n output buffer of sufficient size to hold the output is allocated. `*dst` is\n set to point to the start of that buffer and `*dstSize` is set to the size\n of the output. That buffer is owned by @p serializer and will be freed when\n the @p serializer is destroyed.\n\n @param[in out] dst     Pointer to a variable pointing to the output buffer,\n                        which can start out either pointing to an existing\n                        output buffer or `NULL`. That variable will be set to\n                        point to the output buffer actually used.\n @param[in out] dstSize Pointer to a variable that should be initialized to\n                        the capacity of the output buffer, if one is being\n                        provided, or 0 otherwise. That variable will be set\n                        to contain the written size of the output.\n\n @returns success or an error."]
3406    pub fn ZL_CompressorSerializer_serialize(
3407        serializer: *mut ZL_CompressorSerializer,
3408        compressor: *const ZL_Compressor,
3409        dst: *mut *mut ::std::os::raw::c_void,
3410        dstSize: *mut usize,
3411    ) -> ZL_Report;
3412}
3413extern "C" {
3414    #[doc = " Equivalent @ref ZL_CompressorSerializer_serialize, but produces a human-\n readable output for debugging. This output format cannot currently be\n consumed by OpenZL.\n\n The output is null-terminated."]
3415    pub fn ZL_CompressorSerializer_serializeToJson(
3416        serializer: *mut ZL_CompressorSerializer,
3417        compressor: *const ZL_Compressor,
3418        dst: *mut *mut ::std::os::raw::c_void,
3419        dstSize: *mut usize,
3420    ) -> ZL_Report;
3421}
3422extern "C" {
3423    #[doc = " Converts an already-serialized compressor to human-readable JSON.\n\n The output is null-terminated.\n\n The semantics of @p dst and @p dstSize are as described with @ref\n ZL_CompressorSerializer_serialize."]
3424    pub fn ZL_CompressorSerializer_convertToJson(
3425        serializer: *mut ZL_CompressorSerializer,
3426        dst: *mut *mut ::std::os::raw::c_void,
3427        dstSize: *mut usize,
3428        src: *const ::std::os::raw::c_void,
3429        srcSize: usize,
3430    ) -> ZL_Report;
3431}
3432extern "C" {
3433    #[doc = " Safely retrieve the full error message associated with an error.\n\n @returns the verbose error message associated with the @p result or `NULL`\n          if the error is no longer valid.\n\n @note This string is stored within the @p serializer and is only valid for\n       the lifetime of the @p serializer."]
3434    pub fn ZL_CompressorSerializer_getErrorContextString(
3435        serializer: *const ZL_CompressorSerializer,
3436        result: ZL_Report,
3437    ) -> *const ::std::os::raw::c_char;
3438}
3439extern "C" {
3440    #[doc = " Like @ref ZL_CompressorSerializer_getErrorContextString(), but generic\n across result types. Use like:\n\n ```\n ZL_RESULT_OF(Something) result = ...;\n const char* msg = ZL_CompressorSerializer_getErrorContextString_fromError(\n     serializer, ZL_RES_error(result));\n ```\n\n @returns the verbose error message associated with the @p error or `NULL`\n          if the error is no longer valid.\n\n @note This string is stored within the @p serializer and is only valid for\n       the lifetime of the @p serializer."]
3441    pub fn ZL_CompressorSerializer_getErrorContextString_fromError(
3442        deserializer: *const ZL_CompressorSerializer,
3443        error: ZL_Error,
3444    ) -> *const ::std::os::raw::c_char;
3445}
3446extern "C" {
3447    #[doc = " Creates and initializes an opaque `ZL_CompressorDeserializer` object.\n\n Currently, this object can only be used for a single call to @ref\n ZL_CompressorDeserializer_deserialize(). You need to create a new\n deserializer for every deserialization you want to do.\n\n This will likely be improved in the future; it shouldn't be too hard to do.\n\n @returns the created `ZL_CompressorDeserializer` if successful. Otherwise,\n          returns `NULL`."]
3448    pub fn ZL_CompressorDeserializer_create() -> *mut ZL_CompressorDeserializer;
3449}
3450extern "C" {
3451    #[doc = " Frees all the resources owned by the @p deserializer, including the @p\n deserializer itself."]
3452    pub fn ZL_CompressorDeserializer_free(deserializer: *mut ZL_CompressorDeserializer);
3453}
3454extern "C" {
3455    #[doc = " Reads the serialized compressor represented by @p serialized and pushes\n the graph structure and configuration it describes into @p compressor.\n\n In order for materialization to succeed, the @p compressor must already have\n all of the custom transforms, graph functions, selectors, etc. registered\n that were available when the compressor was serialized. You can use @ref\n ZL_CompressorDeserializer_getDependencies() to determine what non-serialized\n graph components are needed on the destination compressor. You can then set\n those components up before invoking this operation on that compressor.\n\n See the documentation above for a more thorough discussion of these\n requirements and how best to structure a compressor to meet them.\n\n If this operation fails, the compressor may be left in an indeterminate\n state. The best thing to do is to just throw this compressor away\n (via @ref ZL_Compressor_free) and not to try to re-use it."]
3456    pub fn ZL_CompressorDeserializer_deserialize(
3457        deserializer: *mut ZL_CompressorDeserializer,
3458        compressor: *mut ZL_Compressor,
3459        serialized: *const ::std::os::raw::c_void,
3460        serializedSize: usize,
3461    ) -> ZL_Report;
3462}
3463#[doc = " Doesn't own any memory."]
3464#[repr(C)]
3465#[derive(Debug, Copy, Clone)]
3466pub struct ZL_CompressorDeserializer_Dependencies {
3467    pub graph_names: *const *const ::std::os::raw::c_char,
3468    pub num_graphs: usize,
3469    pub node_names: *const *const ::std::os::raw::c_char,
3470    pub num_nodes: usize,
3471}
3472#[test]
3473fn bindgen_test_layout_ZL_CompressorDeserializer_Dependencies() {
3474    const UNINIT: ::std::mem::MaybeUninit<ZL_CompressorDeserializer_Dependencies> =
3475        ::std::mem::MaybeUninit::uninit();
3476    let ptr = UNINIT.as_ptr();
3477    assert_eq!(
3478        ::std::mem::size_of::<ZL_CompressorDeserializer_Dependencies>(),
3479        32usize,
3480        "Size of ZL_CompressorDeserializer_Dependencies"
3481    );
3482    assert_eq!(
3483        ::std::mem::align_of::<ZL_CompressorDeserializer_Dependencies>(),
3484        8usize,
3485        "Alignment of ZL_CompressorDeserializer_Dependencies"
3486    );
3487    assert_eq!(
3488        unsafe { ::std::ptr::addr_of!((*ptr).graph_names) as usize - ptr as usize },
3489        0usize,
3490        "Offset of field: ZL_CompressorDeserializer_Dependencies::graph_names"
3491    );
3492    assert_eq!(
3493        unsafe { ::std::ptr::addr_of!((*ptr).num_graphs) as usize - ptr as usize },
3494        8usize,
3495        "Offset of field: ZL_CompressorDeserializer_Dependencies::num_graphs"
3496    );
3497    assert_eq!(
3498        unsafe { ::std::ptr::addr_of!((*ptr).node_names) as usize - ptr as usize },
3499        16usize,
3500        "Offset of field: ZL_CompressorDeserializer_Dependencies::node_names"
3501    );
3502    assert_eq!(
3503        unsafe { ::std::ptr::addr_of!((*ptr).num_nodes) as usize - ptr as usize },
3504        24usize,
3505        "Offset of field: ZL_CompressorDeserializer_Dependencies::num_nodes"
3506    );
3507}
3508#[repr(C)]
3509#[derive(Debug, Copy, Clone)]
3510pub struct ZL_Result_ZL_CompressorDeserializer_Dependencies_inner {
3511    pub _code: ZL_ErrorCode,
3512    pub _value: ZL_CompressorDeserializer_Dependencies,
3513}
3514#[test]
3515fn bindgen_test_layout_ZL_Result_ZL_CompressorDeserializer_Dependencies_inner() {
3516    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_CompressorDeserializer_Dependencies_inner> =
3517        ::std::mem::MaybeUninit::uninit();
3518    let ptr = UNINIT.as_ptr();
3519    assert_eq!(
3520        ::std::mem::size_of::<ZL_Result_ZL_CompressorDeserializer_Dependencies_inner>(),
3521        40usize,
3522        "Size of ZL_Result_ZL_CompressorDeserializer_Dependencies_inner"
3523    );
3524    assert_eq!(
3525        ::std::mem::align_of::<ZL_Result_ZL_CompressorDeserializer_Dependencies_inner>(),
3526        8usize,
3527        "Alignment of ZL_Result_ZL_CompressorDeserializer_Dependencies_inner"
3528    );
3529    assert_eq!(
3530        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
3531        0usize,
3532        "Offset of field: ZL_Result_ZL_CompressorDeserializer_Dependencies_inner::_code"
3533    );
3534    assert_eq!(
3535        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
3536        8usize,
3537        "Offset of field: ZL_Result_ZL_CompressorDeserializer_Dependencies_inner::_value"
3538    );
3539}
3540#[repr(C)]
3541#[derive(Copy, Clone)]
3542pub union ZL_Result_ZL_CompressorDeserializer_Dependencies_u {
3543    pub _code: ZL_ErrorCode,
3544    pub _value: ZL_Result_ZL_CompressorDeserializer_Dependencies_inner,
3545    pub _error: ZL_Error,
3546}
3547#[test]
3548fn bindgen_test_layout_ZL_Result_ZL_CompressorDeserializer_Dependencies_u() {
3549    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_CompressorDeserializer_Dependencies_u> =
3550        ::std::mem::MaybeUninit::uninit();
3551    let ptr = UNINIT.as_ptr();
3552    assert_eq!(
3553        ::std::mem::size_of::<ZL_Result_ZL_CompressorDeserializer_Dependencies_u>(),
3554        40usize,
3555        "Size of ZL_Result_ZL_CompressorDeserializer_Dependencies_u"
3556    );
3557    assert_eq!(
3558        ::std::mem::align_of::<ZL_Result_ZL_CompressorDeserializer_Dependencies_u>(),
3559        8usize,
3560        "Alignment of ZL_Result_ZL_CompressorDeserializer_Dependencies_u"
3561    );
3562    assert_eq!(
3563        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
3564        0usize,
3565        "Offset of field: ZL_Result_ZL_CompressorDeserializer_Dependencies_u::_code"
3566    );
3567    assert_eq!(
3568        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
3569        0usize,
3570        "Offset of field: ZL_Result_ZL_CompressorDeserializer_Dependencies_u::_value"
3571    );
3572    assert_eq!(
3573        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
3574        0usize,
3575        "Offset of field: ZL_Result_ZL_CompressorDeserializer_Dependencies_u::_error"
3576    );
3577}
3578pub type ZL_Result_ZL_CompressorDeserializer_Dependencies =
3579    ZL_Result_ZL_CompressorDeserializer_Dependencies_u;
3580extern "C" {
3581    #[link_name = "ZL_Result_ZL_CompressorDeserializer_Dependencies_extract__extern"]
3582    pub fn ZL_Result_ZL_CompressorDeserializer_Dependencies_extract(
3583        result: ZL_Result_ZL_CompressorDeserializer_Dependencies,
3584        error: *mut ZL_Error,
3585    ) -> ZL_CompressorDeserializer_Dependencies;
3586}
3587pub type ZL_Result_ZL_CompressorDeserializer_Dependencies_fake_type_needs_semicolon =
3588    ::std::os::raw::c_int;
3589extern "C" {
3590    #[doc = " Read the serialized compressor from @p serialized and find all of the nodes\n and graphs that the serialized compressor refers to but that aren't present\n in the serialized compressor. I.e., lists all the components that must be\n present on a destination compressor in order for this serialized compressor\n to correctly materialize onto that destination compressor.\n\n @param compressor An optional (nullable) pointer to a destination\n                   compressor. If provided, any nodes or graphs already\n                   available in that compressor will be removed from the\n                   returned dependencies, making the returned list strictly\n                   the *unmet* dependencies. Otherwise, returns all nodes and\n                   graphs referred to by the serialized compressor but not\n                   defined by the serialized compressor.\n\n @returns The lists of graph and node names which are unsatisfied\n          dependencies. The memory backing the arrays and strings is owned by\n          the @p deserializer and will be freed when the @p deserializer is\n          destroyed."]
3591    pub fn ZL_CompressorDeserializer_getDependencies(
3592        deserializer: *mut ZL_CompressorDeserializer,
3593        compressor: *const ZL_Compressor,
3594        serialized: *const ::std::os::raw::c_void,
3595        serializedSize: usize,
3596    ) -> ZL_Result_ZL_CompressorDeserializer_Dependencies;
3597}
3598extern "C" {
3599    #[doc = " Safely retrieve the full error message associated with an error.\n\n @returns the verbose error message associated with the @p result or `NULL`\n          if the error is no longer valid.\n\n @note This string is stored within the @p deserializer and is only valid for\n       the lifetime of the @p deserializer."]
3600    pub fn ZL_CompressorDeserializer_getErrorContextString(
3601        deserializer: *const ZL_CompressorDeserializer,
3602        result: ZL_Report,
3603    ) -> *const ::std::os::raw::c_char;
3604}
3605extern "C" {
3606    #[doc = " Like @ref ZL_CompressorDeserializer_getErrorContextString(), but generic\n across result types. Use like:\n\n ```\n ZL_RESULT_OF(Something) result = ...;\n const char* msg = ZL_CompressorDeserializer_getErrorContextString_fromError(\n     deserializer, ZL_RES_error(result));\n ```\n\n @returns the verbose error message associated with the @p error or `NULL`\n          if the error is no longer valid.\n\n @note This string is stored within the @p deserializer and is only valid for\n       the lifetime of the @p deserializer."]
3607    pub fn ZL_CompressorDeserializer_getErrorContextString_fromError(
3608        deserializer: *const ZL_CompressorDeserializer,
3609        error: ZL_Error,
3610    ) -> *const ::std::os::raw::c_char;
3611}
3612pub type ZL_PipeDstCapacityFn = ::std::option::Option<
3613    unsafe extern "C" fn(src: *const ::std::os::raw::c_void, srcSize: usize) -> usize,
3614>;
3615pub type ZL_PipeEncoderFn = ::std::option::Option<
3616    unsafe extern "C" fn(
3617        dst: *mut ::std::os::raw::c_void,
3618        dstCapacity: usize,
3619        src: *const ::std::os::raw::c_void,
3620        srcSize: usize,
3621    ) -> usize,
3622>;
3623#[repr(C)]
3624#[derive(Debug, Copy, Clone)]
3625pub struct ZL_PipeEncoderDesc {
3626    pub CTid: ZL_IDType,
3627    pub transform_f: ZL_PipeEncoderFn,
3628    pub dstBound_f: ZL_PipeDstCapacityFn,
3629    pub name: *const ::std::os::raw::c_char,
3630}
3631#[test]
3632fn bindgen_test_layout_ZL_PipeEncoderDesc() {
3633    const UNINIT: ::std::mem::MaybeUninit<ZL_PipeEncoderDesc> = ::std::mem::MaybeUninit::uninit();
3634    let ptr = UNINIT.as_ptr();
3635    assert_eq!(
3636        ::std::mem::size_of::<ZL_PipeEncoderDesc>(),
3637        32usize,
3638        "Size of ZL_PipeEncoderDesc"
3639    );
3640    assert_eq!(
3641        ::std::mem::align_of::<ZL_PipeEncoderDesc>(),
3642        8usize,
3643        "Alignment of ZL_PipeEncoderDesc"
3644    );
3645    assert_eq!(
3646        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
3647        0usize,
3648        "Offset of field: ZL_PipeEncoderDesc::CTid"
3649    );
3650    assert_eq!(
3651        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
3652        8usize,
3653        "Offset of field: ZL_PipeEncoderDesc::transform_f"
3654    );
3655    assert_eq!(
3656        unsafe { ::std::ptr::addr_of!((*ptr).dstBound_f) as usize - ptr as usize },
3657        16usize,
3658        "Offset of field: ZL_PipeEncoderDesc::dstBound_f"
3659    );
3660    assert_eq!(
3661        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
3662        24usize,
3663        "Offset of field: ZL_PipeEncoderDesc::name"
3664    );
3665}
3666extern "C" {
3667    #[doc = " Register a custom pipe encoder, to be employed in upcoming Graph.\n This registration is specialized for simple pipe transforms.\n Counterpart: ZL_DCtx_registerPipeDecoder().\n This action creates a NodeID, provided as @return value.\n Graphs using custom encoders are only decodable if,\n at decompression time, a custom decoder of same CTid is registered."]
3668    pub fn ZL_Compressor_registerPipeEncoder(
3669        cgraph: *mut ZL_Compressor,
3670        ctd: *const ZL_PipeEncoderDesc,
3671    ) -> ZL_NodeID;
3672}
3673pub type ZL_SplitEncoderFn = ::std::option::Option<
3674    unsafe extern "C" fn(
3675        eic: *mut ZL_Encoder,
3676        writtenSizes: *mut usize,
3677        src: *const ::std::os::raw::c_void,
3678        srcSize: usize,
3679    ) -> ZL_Report,
3680>;
3681#[repr(C)]
3682#[derive(Debug, Copy, Clone)]
3683pub struct ZL_SplitEncoderDesc {
3684    pub CTid: ZL_IDType,
3685    pub transform_f: ZL_SplitEncoderFn,
3686    pub nbOutputStreams: usize,
3687    pub localParams: ZL_LocalParams,
3688    pub name: *const ::std::os::raw::c_char,
3689}
3690#[test]
3691fn bindgen_test_layout_ZL_SplitEncoderDesc() {
3692    const UNINIT: ::std::mem::MaybeUninit<ZL_SplitEncoderDesc> = ::std::mem::MaybeUninit::uninit();
3693    let ptr = UNINIT.as_ptr();
3694    assert_eq!(
3695        ::std::mem::size_of::<ZL_SplitEncoderDesc>(),
3696        80usize,
3697        "Size of ZL_SplitEncoderDesc"
3698    );
3699    assert_eq!(
3700        ::std::mem::align_of::<ZL_SplitEncoderDesc>(),
3701        8usize,
3702        "Alignment of ZL_SplitEncoderDesc"
3703    );
3704    assert_eq!(
3705        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
3706        0usize,
3707        "Offset of field: ZL_SplitEncoderDesc::CTid"
3708    );
3709    assert_eq!(
3710        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
3711        8usize,
3712        "Offset of field: ZL_SplitEncoderDesc::transform_f"
3713    );
3714    assert_eq!(
3715        unsafe { ::std::ptr::addr_of!((*ptr).nbOutputStreams) as usize - ptr as usize },
3716        16usize,
3717        "Offset of field: ZL_SplitEncoderDesc::nbOutputStreams"
3718    );
3719    assert_eq!(
3720        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
3721        24usize,
3722        "Offset of field: ZL_SplitEncoderDesc::localParams"
3723    );
3724    assert_eq!(
3725        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
3726        72usize,
3727        "Offset of field: ZL_SplitEncoderDesc::name"
3728    );
3729}
3730extern "C" {
3731    #[doc = " Register a custom Split Transform"]
3732    pub fn ZL_Compressor_registerSplitEncoder(
3733        cgraph: *mut ZL_Compressor,
3734        ctd: *const ZL_SplitEncoderDesc,
3735    ) -> ZL_NodeID;
3736}
3737extern "C" {
3738    pub fn ZL_Encoder_createAllOutBuffers(
3739        eic: *mut ZL_Encoder,
3740        buffStarts: *mut *mut ::std::os::raw::c_void,
3741        buffCapacities: *const usize,
3742        nbBuffs: usize,
3743    ) -> ZL_Report;
3744}
3745extern "C" {
3746    #[link_name = "ZL_codemodOutputAsData__extern"]
3747    pub fn ZL_codemodOutputAsData(output: *mut ZL_Output) -> *mut ZL_Data;
3748}
3749extern "C" {
3750    #[link_name = "ZL_codemodDataAsOutput__extern"]
3751    pub fn ZL_codemodDataAsOutput(data: *mut ZL_Data) -> *mut ZL_Output;
3752}
3753extern "C" {
3754    #[link_name = "ZL_codemodConstOutputAsData__extern"]
3755    pub fn ZL_codemodConstOutputAsData(output: *const ZL_Output) -> *const ZL_Data;
3756}
3757extern "C" {
3758    #[link_name = "ZL_codemodConstDataAsOutput__extern"]
3759    pub fn ZL_codemodConstDataAsOutput(data: *const ZL_Data) -> *const ZL_Output;
3760}
3761extern "C" {
3762    #[link_name = "ZL_codemodConstDatasAsOutputs__extern"]
3763    pub fn ZL_codemodConstDatasAsOutputs(datas: *mut *const ZL_Data) -> *mut *const ZL_Output;
3764}
3765extern "C" {
3766    #[link_name = "ZL_codemodOutputsAsDatas__extern"]
3767    pub fn ZL_codemodOutputsAsDatas(outputs: *mut *mut ZL_Output) -> *mut *mut ZL_Data;
3768}
3769extern "C" {
3770    #[link_name = "ZL_Output_type__extern"]
3771    pub fn ZL_Output_type(output: *const ZL_Output) -> ZL_Type;
3772}
3773extern "C" {
3774    #[link_name = "ZL_Output_id__extern"]
3775    pub fn ZL_Output_id(output: *const ZL_Output) -> ZL_DataID;
3776}
3777extern "C" {
3778    #[doc = " @returns The element width of the @p output if it has a buffer reserved,\n otherwise it returns NULL. Within a custom codec, this function always\n succeeds, because the output always has a buffer reserved. If the type\n of the output is String, it returns 0 instead."]
3779    pub fn ZL_Output_eltWidth(output: *const ZL_Output) -> ZL_Report;
3780}
3781extern "C" {
3782    #[doc = " @returns The number of elements committed in @p output if it has been\n committed. Otherwise, returns an error if the write to @p output has not been\n committed."]
3783    pub fn ZL_Output_numElts(output: *const ZL_Output) -> ZL_Report;
3784}
3785extern "C" {
3786    #[doc = " @returns The content size in bytes that has been committed to @p output.\n For non-string types, this is the eltWidth * numElts. For string types, this\n is the sum of the lengths of each stream. If @p output has not been commited,\n it returns an error."]
3787    pub fn ZL_Output_contentSize(output: *const ZL_Output) -> ZL_Report;
3788}
3789extern "C" {
3790    #[doc = " @returns The capacity of the buffer reserved for @p output in number of\n elements. If @p output has not been reserved, it returns an error.\n For string types, this is the number of strings that can be written into the\n buffer."]
3791    pub fn ZL_Output_eltsCapacity(output: *const ZL_Output) -> ZL_Report;
3792}
3793extern "C" {
3794    #[doc = " @returns The capacity of the buffer reserved for @p output in bytes. If\n @p output has not been reserved, it returns an error. For string types, this\n is the sum of the lengths of each string that can be written into the buffer."]
3795    pub fn ZL_Output_contentCapacity(output: *const ZL_Output) -> ZL_Report;
3796}
3797extern "C" {
3798    #[doc = " These methods provide direct access to internal buffer.\n Warning : users must pay attention to buffer boundaries.\n @return pointer to buffer position to resume writing.\n @note for `ZL_Type_string`, returns a pointer to the buffer containing the\n concatenated strings."]
3799    #[link_name = "ZL_Output_ptr__extern"]
3800    pub fn ZL_Output_ptr(output: *mut ZL_Output) -> *mut ::std::os::raw::c_void;
3801}
3802extern "C" {
3803    #[doc = " @returns a const pointer to the _beginning_ of the buffer.\n It returns NULL if the output does not have a buffer attached to it yet.\n This cannot happen within a custom codec.\n Warning : users must pay attention to buffer boundaries.\n @note for `ZL_Type_string`, returns a pointer to the buffer containing the\n concatenated strings."]
3804    #[link_name = "ZL_Output_constPtr__extern"]
3805    pub fn ZL_Output_constPtr(output: *const ZL_Output) -> *const ::std::os::raw::c_void;
3806}
3807extern "C" {
3808    #[doc = " This method is only valid for `ZL_Type_string` Data.\n It requests write access into StringLens array.\n Only valid if StringLens array has already been allocated.\n @return pointer to array position to resume writing.\n or NULL if any of above conditions is violated.\n\n Array's capacity is supposed known from reservation request.\n After writing into the array, the nb of Strings, which is also\n the nb of String Lengths written, must be provided using\n ZL_Data_commit()."]
3809    #[link_name = "ZL_Output_stringLens__extern"]
3810    pub fn ZL_Output_stringLens(output: *mut ZL_Output) -> *mut u32;
3811}
3812extern "C" {
3813    #[doc = " @returns A const pointer to the array containing lengths for string-typed\n outputs. It returns NULL if the output is not of type string."]
3814    #[link_name = "ZL_Output_constStringLens__extern"]
3815    pub fn ZL_Output_constStringLens(output: *const ZL_Output) -> *const u32;
3816}
3817extern "C" {
3818    #[doc = " This method is only valid for `ZL_Type_string` Data.\n It reserves memory space for StringLens array, and returns a pointer to it.\n The buffer is owned by @p data and has the same lifetime.\n The returned pointer can be used to write into the array.\n After writing into the array, the nb of String Lengths provided must be\n signaled using @ref ZL_Output_commit().\n This method will fail if StringLens is already allocated.\n @return `NULL` if incorrect data type, or allocation error."]
3819    #[link_name = "ZL_Output_reserveStringLens__extern"]
3820    pub fn ZL_Output_reserveStringLens(output: *mut ZL_Output, numStrings: usize) -> *mut u32;
3821}
3822extern "C" {
3823    #[doc = " @brief Commit the number of elements written into @p data.\n\n This method must be called exactly once for every output.\n The @p nbElts must be `<=` reserved capacity of @p data.\n Note that, for `ZL_Type_string`, this is the number of strings written into\n@p data.\n The operation will automatically determine the total size of all Strings\nwithin @p data.\n\n @returns Success or an error. This function will fail if it is called more\n than once on the same @p data, or if @p nbElts is greater than @p data's\n capacity.\n\n Terminating a Codec _without_ committing anything to @p data (not even `0`)\n is considered an error, that is caught by the Engine\n (classified as node processing error).\n\n @note @p nbElts, as \"number of elements\", is **not** the same as size in\nbytes written in\n the buffer. For Numerics and Structs, the translation is\n straighforward. For Strings, the field sizes array must be\n provided first, using `ZL_Data_reserveStringLens()` to create\n and access the array. The resulting useful content size will then\n be calculated from the sum of field sizes. It will be controlled,\n and there will be an error if sum(sizes) > bufferCapacity."]
3824    #[link_name = "ZL_Output_commit__extern"]
3825    pub fn ZL_Output_commit(output: *mut ZL_Output, numElts: usize) -> ZL_Report;
3826}
3827extern "C" {
3828    #[doc = " @brief Sets integer metadata with the key @p key and value @p value on the\n stream.\n\n It is only valid to call ZL_Data_setIntMetadata() with the same @p key\n once. Subsequent calls with the same @p key will return an error.\n\n @param key Metdata key\n @param value Metadata value\n\n @returns Success or an error. This function will fail due to repeated calls\n with the same @p key, or upon running out of space for the metadata.\n\n @note In this proposed design, Int Metadata are set one by one.\n Another possible design could follow the IntParams\n model, where all parameters must be set all-at-once, and be\n provided as a single vector of IntParams structures.\n\n @note The set value is an int, hence it's not suitable to store \"large\"\n values, like 64-bit ULL."]
3829    #[link_name = "ZL_Output_setIntMetadata__extern"]
3830    pub fn ZL_Output_setIntMetadata(
3831        output: *mut ZL_Output,
3832        key: ::std::os::raw::c_int,
3833        value: ::std::os::raw::c_int,
3834    ) -> ZL_Report;
3835}
3836extern "C" {
3837    #[doc = " @returns The value if present. ZL_IntMetadata::isPresent != 0\n when the @p key exists, in which case ZL_IntMetadata::mValue is set to the\n value."]
3838    #[link_name = "ZL_Output_getIntMetadata__extern"]
3839    pub fn ZL_Output_getIntMetadata(
3840        output: *const ZL_Output,
3841        key: ::std::os::raw::c_int,
3842    ) -> ZL_IntMetadata;
3843}
3844pub type ZL_SerialSelectorFn = ::std::option::Option<
3845    unsafe extern "C" fn(
3846        src: *const ::std::os::raw::c_void,
3847        srcSize: usize,
3848        customGraphs: *const ZL_GraphID,
3849        nbCustomGraphs: usize,
3850    ) -> ZL_GraphID,
3851>;
3852#[repr(C)]
3853#[derive(Debug, Copy, Clone)]
3854pub struct ZL_SerialSelectorDesc {
3855    pub selector_f: ZL_SerialSelectorFn,
3856    pub customGraphs: *const ZL_GraphID,
3857    pub nbCustomGraphs: usize,
3858    pub name: *const ::std::os::raw::c_char,
3859}
3860#[test]
3861fn bindgen_test_layout_ZL_SerialSelectorDesc() {
3862    const UNINIT: ::std::mem::MaybeUninit<ZL_SerialSelectorDesc> =
3863        ::std::mem::MaybeUninit::uninit();
3864    let ptr = UNINIT.as_ptr();
3865    assert_eq!(
3866        ::std::mem::size_of::<ZL_SerialSelectorDesc>(),
3867        32usize,
3868        "Size of ZL_SerialSelectorDesc"
3869    );
3870    assert_eq!(
3871        ::std::mem::align_of::<ZL_SerialSelectorDesc>(),
3872        8usize,
3873        "Alignment of ZL_SerialSelectorDesc"
3874    );
3875    assert_eq!(
3876        unsafe { ::std::ptr::addr_of!((*ptr).selector_f) as usize - ptr as usize },
3877        0usize,
3878        "Offset of field: ZL_SerialSelectorDesc::selector_f"
3879    );
3880    assert_eq!(
3881        unsafe { ::std::ptr::addr_of!((*ptr).customGraphs) as usize - ptr as usize },
3882        8usize,
3883        "Offset of field: ZL_SerialSelectorDesc::customGraphs"
3884    );
3885    assert_eq!(
3886        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomGraphs) as usize - ptr as usize },
3887        16usize,
3888        "Offset of field: ZL_SerialSelectorDesc::nbCustomGraphs"
3889    );
3890    assert_eq!(
3891        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
3892        24usize,
3893        "Offset of field: ZL_SerialSelectorDesc::name"
3894    );
3895}
3896extern "C" {
3897    pub fn ZL_Compressor_registerSerialSelectorGraph(
3898        cgraph: *mut ZL_Compressor,
3899        csd: *const ZL_SerialSelectorDesc,
3900    ) -> ZL_GraphID;
3901}
3902pub type ZL_SelectorFn = ::std::option::Option<
3903    unsafe extern "C" fn(
3904        selCtx: *const ZL_Selector,
3905        inputStream: *const ZL_Input,
3906        customGraphs: *const ZL_GraphID,
3907        nbCustomGraphs: usize,
3908    ) -> ZL_GraphID,
3909>;
3910#[repr(C)]
3911#[derive(Debug, Copy, Clone)]
3912pub struct ZL_SelectorDesc {
3913    pub selector_f: ZL_SelectorFn,
3914    #[doc = " Selectors optionally support multiple input types,\n using bitmap masking (ex: ZL_Type_struct | ZL_Type_string).\n In which case, it's the responsibility of the selector to select\n a successor featuring an input type compatible with current input.\n Note that it's always preferable to limit Selector's input type\n to the minimum nb of types possible,\n because it makes graph validation more accurate and effective."]
3915    pub inStreamType: ZL_Type,
3916    pub customGraphs: *const ZL_GraphID,
3917    pub nbCustomGraphs: usize,
3918    pub localParams: ZL_LocalParams,
3919    #[doc = " Optional, the name of the graph rooted by the selector."]
3920    pub name: *const ::std::os::raw::c_char,
3921    #[doc = " Optionally an opaque pointer that can be queried with\n ZL_Selector_getOpaquePtr().\n OpenZL unconditionally takes ownership of this pointer, even if\n registration fails, and it lives for the lifetime of the compressor."]
3922    pub opaque: ZL_OpaquePtr,
3923}
3924#[test]
3925fn bindgen_test_layout_ZL_SelectorDesc() {
3926    const UNINIT: ::std::mem::MaybeUninit<ZL_SelectorDesc> = ::std::mem::MaybeUninit::uninit();
3927    let ptr = UNINIT.as_ptr();
3928    assert_eq!(
3929        ::std::mem::size_of::<ZL_SelectorDesc>(),
3930        112usize,
3931        "Size of ZL_SelectorDesc"
3932    );
3933    assert_eq!(
3934        ::std::mem::align_of::<ZL_SelectorDesc>(),
3935        8usize,
3936        "Alignment of ZL_SelectorDesc"
3937    );
3938    assert_eq!(
3939        unsafe { ::std::ptr::addr_of!((*ptr).selector_f) as usize - ptr as usize },
3940        0usize,
3941        "Offset of field: ZL_SelectorDesc::selector_f"
3942    );
3943    assert_eq!(
3944        unsafe { ::std::ptr::addr_of!((*ptr).inStreamType) as usize - ptr as usize },
3945        8usize,
3946        "Offset of field: ZL_SelectorDesc::inStreamType"
3947    );
3948    assert_eq!(
3949        unsafe { ::std::ptr::addr_of!((*ptr).customGraphs) as usize - ptr as usize },
3950        16usize,
3951        "Offset of field: ZL_SelectorDesc::customGraphs"
3952    );
3953    assert_eq!(
3954        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomGraphs) as usize - ptr as usize },
3955        24usize,
3956        "Offset of field: ZL_SelectorDesc::nbCustomGraphs"
3957    );
3958    assert_eq!(
3959        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
3960        32usize,
3961        "Offset of field: ZL_SelectorDesc::localParams"
3962    );
3963    assert_eq!(
3964        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
3965        80usize,
3966        "Offset of field: ZL_SelectorDesc::name"
3967    );
3968    assert_eq!(
3969        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
3970        88usize,
3971        "Offset of field: ZL_SelectorDesc::opaque"
3972    );
3973}
3974extern "C" {
3975    #[doc = " Register a selector graph given the @p desc.\n\n @note This is a new variant of @ref ZL_Compressor_registerSelectorGraph that\n reports errors using OpenZL's ZL_Report error system.\n\n @param desc The description of the selector, must be non-null.\n\n @return The new graph ID, or an error."]
3976    pub fn ZL_Compressor_registerSelectorGraph2(
3977        compressor: *mut ZL_Compressor,
3978        desc: *const ZL_SelectorDesc,
3979    ) -> ZL_Result_ZL_GraphID;
3980}
3981extern "C" {
3982    pub fn ZL_Compressor_registerSelectorGraph(
3983        cgraph: *mut ZL_Compressor,
3984        ctsd: *const ZL_SelectorDesc,
3985    ) -> ZL_GraphID;
3986}
3987extern "C" {
3988    #[doc = " Utility function to get the input types supported by @gid as an input mask.\n Throws an error if @gid is not valid or does not have exactly one input.\n See ZL_Compressor_Graph_getInput0Mask() for more details."]
3989    pub fn ZL_Selector_getInput0MaskForGraph(
3990        selCtx: *const ZL_Selector,
3991        gid: ZL_GraphID,
3992    ) -> ZL_Type;
3993}
3994extern "C" {
3995    pub fn ZL_Selector_getOpaquePtr(selector: *const ZL_Selector) -> *const ::std::os::raw::c_void;
3996}
3997#[repr(C)]
3998#[derive(Copy, Clone)]
3999pub struct ZL_GraphReport {
4000    pub finalCompressedSize: ZL_Report,
4001}
4002#[test]
4003fn bindgen_test_layout_ZL_GraphReport() {
4004    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphReport> = ::std::mem::MaybeUninit::uninit();
4005    let ptr = UNINIT.as_ptr();
4006    assert_eq!(
4007        ::std::mem::size_of::<ZL_GraphReport>(),
4008        16usize,
4009        "Size of ZL_GraphReport"
4010    );
4011    assert_eq!(
4012        ::std::mem::align_of::<ZL_GraphReport>(),
4013        8usize,
4014        "Alignment of ZL_GraphReport"
4015    );
4016    assert_eq!(
4017        unsafe { ::std::ptr::addr_of!((*ptr).finalCompressedSize) as usize - ptr as usize },
4018        0usize,
4019        "Offset of field: ZL_GraphReport::finalCompressedSize"
4020    );
4021}
4022extern "C" {
4023    pub fn ZL_Selector_tryGraph(
4024        selCtx: *const ZL_Selector,
4025        input: *const ZL_Input,
4026        graphid: ZL_GraphID,
4027    ) -> ZL_GraphReport;
4028}
4029extern "C" {
4030    pub fn ZL_Selector_setSuccessorParams(
4031        selCtx: *const ZL_Selector,
4032        lparams: *const ZL_LocalParams,
4033    ) -> ZL_Report;
4034}
4035extern "C" {
4036    pub fn ZL_Selector_getCParam(
4037        selCtx: *const ZL_Selector,
4038        gparam: ZL_CParam,
4039    ) -> ::std::os::raw::c_int;
4040}
4041extern "C" {
4042    pub fn ZL_Selector_getLocalIntParam(
4043        selCtx: *const ZL_Selector,
4044        intParamId: ::std::os::raw::c_int,
4045    ) -> ZL_IntParam;
4046}
4047extern "C" {
4048    pub fn ZL_Selector_getLocalParam(
4049        selCtx: *const ZL_Selector,
4050        paramId: ::std::os::raw::c_int,
4051    ) -> ZL_RefParam;
4052}
4053extern "C" {
4054    pub fn ZL_Selector_getLocalCopyParam(
4055        selCtx: *const ZL_Selector,
4056        copyParamId: ::std::os::raw::c_int,
4057    ) -> ZL_CopyParam;
4058}
4059extern "C" {
4060    pub fn ZL_Selector_getLocalIntParams(selCtx: *const ZL_Selector) -> ZL_LocalIntParams;
4061}
4062extern "C" {
4063    pub fn ZL_Selector_getScratchSpace(
4064        selCtx: *const ZL_Selector,
4065        size: usize,
4066    ) -> *mut ::std::os::raw::c_void;
4067}
4068pub type ZL_CodecStateAlloc =
4069    ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>;
4070pub type ZL_CodecStateFree =
4071    ::std::option::Option<unsafe extern "C" fn(state: *mut ::std::os::raw::c_void)>;
4072#[repr(C)]
4073#[derive(Debug, Copy, Clone)]
4074pub struct ZL_CodecStateManager {
4075    pub stateAlloc: ZL_CodecStateAlloc,
4076    pub stateFree: ZL_CodecStateFree,
4077    pub optionalStateID: usize,
4078}
4079#[test]
4080fn bindgen_test_layout_ZL_CodecStateManager() {
4081    const UNINIT: ::std::mem::MaybeUninit<ZL_CodecStateManager> = ::std::mem::MaybeUninit::uninit();
4082    let ptr = UNINIT.as_ptr();
4083    assert_eq!(
4084        ::std::mem::size_of::<ZL_CodecStateManager>(),
4085        24usize,
4086        "Size of ZL_CodecStateManager"
4087    );
4088    assert_eq!(
4089        ::std::mem::align_of::<ZL_CodecStateManager>(),
4090        8usize,
4091        "Alignment of ZL_CodecStateManager"
4092    );
4093    assert_eq!(
4094        unsafe { ::std::ptr::addr_of!((*ptr).stateAlloc) as usize - ptr as usize },
4095        0usize,
4096        "Offset of field: ZL_CodecStateManager::stateAlloc"
4097    );
4098    assert_eq!(
4099        unsafe { ::std::ptr::addr_of!((*ptr).stateFree) as usize - ptr as usize },
4100        8usize,
4101        "Offset of field: ZL_CodecStateManager::stateFree"
4102    );
4103    assert_eq!(
4104        unsafe { ::std::ptr::addr_of!((*ptr).optionalStateID) as usize - ptr as usize },
4105        16usize,
4106        "Offset of field: ZL_CodecStateManager::optionalStateID"
4107    );
4108}
4109pub type ZL_TypedEncoderFn = ::std::option::Option<
4110    unsafe extern "C" fn(ectx: *mut ZL_Encoder, in_: *const ZL_Input) -> ZL_Report,
4111>;
4112#[repr(C)]
4113#[derive(Debug, Copy, Clone)]
4114pub struct ZL_TypedGraphDesc {
4115    pub CTid: ZL_IDType,
4116    pub inStreamType: ZL_Type,
4117    pub outStreamTypes: *const ZL_Type,
4118    pub nbOutStreams: usize,
4119}
4120#[test]
4121fn bindgen_test_layout_ZL_TypedGraphDesc() {
4122    const UNINIT: ::std::mem::MaybeUninit<ZL_TypedGraphDesc> = ::std::mem::MaybeUninit::uninit();
4123    let ptr = UNINIT.as_ptr();
4124    assert_eq!(
4125        ::std::mem::size_of::<ZL_TypedGraphDesc>(),
4126        24usize,
4127        "Size of ZL_TypedGraphDesc"
4128    );
4129    assert_eq!(
4130        ::std::mem::align_of::<ZL_TypedGraphDesc>(),
4131        8usize,
4132        "Alignment of ZL_TypedGraphDesc"
4133    );
4134    assert_eq!(
4135        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
4136        0usize,
4137        "Offset of field: ZL_TypedGraphDesc::CTid"
4138    );
4139    assert_eq!(
4140        unsafe { ::std::ptr::addr_of!((*ptr).inStreamType) as usize - ptr as usize },
4141        4usize,
4142        "Offset of field: ZL_TypedGraphDesc::inStreamType"
4143    );
4144    assert_eq!(
4145        unsafe { ::std::ptr::addr_of!((*ptr).outStreamTypes) as usize - ptr as usize },
4146        8usize,
4147        "Offset of field: ZL_TypedGraphDesc::outStreamTypes"
4148    );
4149    assert_eq!(
4150        unsafe { ::std::ptr::addr_of!((*ptr).nbOutStreams) as usize - ptr as usize },
4151        16usize,
4152        "Offset of field: ZL_TypedGraphDesc::nbOutStreams"
4153    );
4154}
4155#[repr(C)]
4156#[derive(Debug, Copy, Clone)]
4157pub struct ZL_TypedEncoderDesc {
4158    pub gd: ZL_TypedGraphDesc,
4159    pub transform_f: ZL_TypedEncoderFn,
4160    pub localParams: ZL_LocalParams,
4161    pub name: *const ::std::os::raw::c_char,
4162    pub trStateMgr: ZL_CodecStateManager,
4163    #[doc = " Optionally an opaque pointer that can be queried with\n ZL_Encoder_getOpaquePtr().\n OpenZL unconditionally takes ownership of this pointer, even if\n registration fails, and it lives for the lifetime of the compressor."]
4164    pub opaque: ZL_OpaquePtr,
4165}
4166#[test]
4167fn bindgen_test_layout_ZL_TypedEncoderDesc() {
4168    const UNINIT: ::std::mem::MaybeUninit<ZL_TypedEncoderDesc> = ::std::mem::MaybeUninit::uninit();
4169    let ptr = UNINIT.as_ptr();
4170    assert_eq!(
4171        ::std::mem::size_of::<ZL_TypedEncoderDesc>(),
4172        136usize,
4173        "Size of ZL_TypedEncoderDesc"
4174    );
4175    assert_eq!(
4176        ::std::mem::align_of::<ZL_TypedEncoderDesc>(),
4177        8usize,
4178        "Alignment of ZL_TypedEncoderDesc"
4179    );
4180    assert_eq!(
4181        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
4182        0usize,
4183        "Offset of field: ZL_TypedEncoderDesc::gd"
4184    );
4185    assert_eq!(
4186        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
4187        24usize,
4188        "Offset of field: ZL_TypedEncoderDesc::transform_f"
4189    );
4190    assert_eq!(
4191        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
4192        32usize,
4193        "Offset of field: ZL_TypedEncoderDesc::localParams"
4194    );
4195    assert_eq!(
4196        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
4197        80usize,
4198        "Offset of field: ZL_TypedEncoderDesc::name"
4199    );
4200    assert_eq!(
4201        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
4202        88usize,
4203        "Offset of field: ZL_TypedEncoderDesc::trStateMgr"
4204    );
4205    assert_eq!(
4206        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
4207        112usize,
4208        "Offset of field: ZL_TypedEncoderDesc::opaque"
4209    );
4210}
4211extern "C" {
4212    #[doc = " Register a custom encoder that can be used to compress.\n\n @note This is a new variant of @ref ZL_Compressor_registerTypedEncoder that\n reports errors using OpenZL's ZL_Report error system.\n\n @warning Using a custom encoder requires the decoder to be registered before\n decompression.\n\n @param desc The description of the encoder.\n\n @returns The new node ID, or an error."]
4213    pub fn ZL_Compressor_registerTypedEncoder2(
4214        compressor: *mut ZL_Compressor,
4215        desc: *const ZL_TypedEncoderDesc,
4216    ) -> ZL_Result_ZL_NodeID;
4217}
4218extern "C" {
4219    #[doc = " Register a custom Typed Transform, to be employed in upcoming graph."]
4220    pub fn ZL_Compressor_registerTypedEncoder(
4221        cgraph: *mut ZL_Compressor,
4222        ctd: *const ZL_TypedEncoderDesc,
4223    ) -> ZL_NodeID;
4224}
4225pub type ZL_VOEncoderFn = ::std::option::Option<
4226    unsafe extern "C" fn(ectx: *mut ZL_Encoder, in_: *const ZL_Input) -> ZL_Report,
4227>;
4228#[repr(C)]
4229#[derive(Debug, Copy, Clone)]
4230pub struct ZL_VOGraphDesc {
4231    pub CTid: ZL_IDType,
4232    pub inStreamType: ZL_Type,
4233    pub singletonTypes: *const ZL_Type,
4234    pub nbSingletons: usize,
4235    pub voTypes: *const ZL_Type,
4236    pub nbVOs: usize,
4237}
4238#[test]
4239fn bindgen_test_layout_ZL_VOGraphDesc() {
4240    const UNINIT: ::std::mem::MaybeUninit<ZL_VOGraphDesc> = ::std::mem::MaybeUninit::uninit();
4241    let ptr = UNINIT.as_ptr();
4242    assert_eq!(
4243        ::std::mem::size_of::<ZL_VOGraphDesc>(),
4244        40usize,
4245        "Size of ZL_VOGraphDesc"
4246    );
4247    assert_eq!(
4248        ::std::mem::align_of::<ZL_VOGraphDesc>(),
4249        8usize,
4250        "Alignment of ZL_VOGraphDesc"
4251    );
4252    assert_eq!(
4253        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
4254        0usize,
4255        "Offset of field: ZL_VOGraphDesc::CTid"
4256    );
4257    assert_eq!(
4258        unsafe { ::std::ptr::addr_of!((*ptr).inStreamType) as usize - ptr as usize },
4259        4usize,
4260        "Offset of field: ZL_VOGraphDesc::inStreamType"
4261    );
4262    assert_eq!(
4263        unsafe { ::std::ptr::addr_of!((*ptr).singletonTypes) as usize - ptr as usize },
4264        8usize,
4265        "Offset of field: ZL_VOGraphDesc::singletonTypes"
4266    );
4267    assert_eq!(
4268        unsafe { ::std::ptr::addr_of!((*ptr).nbSingletons) as usize - ptr as usize },
4269        16usize,
4270        "Offset of field: ZL_VOGraphDesc::nbSingletons"
4271    );
4272    assert_eq!(
4273        unsafe { ::std::ptr::addr_of!((*ptr).voTypes) as usize - ptr as usize },
4274        24usize,
4275        "Offset of field: ZL_VOGraphDesc::voTypes"
4276    );
4277    assert_eq!(
4278        unsafe { ::std::ptr::addr_of!((*ptr).nbVOs) as usize - ptr as usize },
4279        32usize,
4280        "Offset of field: ZL_VOGraphDesc::nbVOs"
4281    );
4282}
4283#[repr(C)]
4284#[derive(Debug, Copy, Clone)]
4285pub struct ZL_VOEncoderDesc {
4286    pub gd: ZL_VOGraphDesc,
4287    pub transform_f: ZL_VOEncoderFn,
4288    pub localParams: ZL_LocalParams,
4289    pub name: *const ::std::os::raw::c_char,
4290    pub trStateMgr: ZL_CodecStateManager,
4291    #[doc = " Optionally an opaque pointer that can be queried with\n ZL_Encoder_getOpaquePtr().\n OpenZL unconditionally takes ownership of this pointer, even if\n registration fails, and it lives for the lifetime of the compressor."]
4292    pub opaque: ZL_OpaquePtr,
4293}
4294#[test]
4295fn bindgen_test_layout_ZL_VOEncoderDesc() {
4296    const UNINIT: ::std::mem::MaybeUninit<ZL_VOEncoderDesc> = ::std::mem::MaybeUninit::uninit();
4297    let ptr = UNINIT.as_ptr();
4298    assert_eq!(
4299        ::std::mem::size_of::<ZL_VOEncoderDesc>(),
4300        152usize,
4301        "Size of ZL_VOEncoderDesc"
4302    );
4303    assert_eq!(
4304        ::std::mem::align_of::<ZL_VOEncoderDesc>(),
4305        8usize,
4306        "Alignment of ZL_VOEncoderDesc"
4307    );
4308    assert_eq!(
4309        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
4310        0usize,
4311        "Offset of field: ZL_VOEncoderDesc::gd"
4312    );
4313    assert_eq!(
4314        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
4315        40usize,
4316        "Offset of field: ZL_VOEncoderDesc::transform_f"
4317    );
4318    assert_eq!(
4319        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
4320        48usize,
4321        "Offset of field: ZL_VOEncoderDesc::localParams"
4322    );
4323    assert_eq!(
4324        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
4325        96usize,
4326        "Offset of field: ZL_VOEncoderDesc::name"
4327    );
4328    assert_eq!(
4329        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
4330        104usize,
4331        "Offset of field: ZL_VOEncoderDesc::trStateMgr"
4332    );
4333    assert_eq!(
4334        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
4335        128usize,
4336        "Offset of field: ZL_VOEncoderDesc::opaque"
4337    );
4338}
4339extern "C" {
4340    #[doc = " Register a custom encoder that can be used to compress.\n\n @note This is a new variant of @ref ZL_Compressor_registerVOEncoder that\n reports errors using OpenZL's ZL_Report error system.\n\n @warning Using a custom encoder requires the decoder to be registered before\n decompression.\n\n @param desc The description of the encoder.\n\n @returns The new node ID, or an error."]
4341    pub fn ZL_Compressor_registerVOEncoder2(
4342        compressor: *mut ZL_Compressor,
4343        desc: *const ZL_VOEncoderDesc,
4344    ) -> ZL_Result_ZL_NodeID;
4345}
4346extern "C" {
4347    pub fn ZL_Compressor_registerVOEncoder(
4348        cgraph: *mut ZL_Compressor,
4349        ctd: *const ZL_VOEncoderDesc,
4350    ) -> ZL_NodeID;
4351}
4352pub type ZL_MIEncoderFn = ::std::option::Option<
4353    unsafe extern "C" fn(
4354        eictx: *mut ZL_Encoder,
4355        inputs: *mut *const ZL_Input,
4356        nbInputs: usize,
4357    ) -> ZL_Report,
4358>;
4359#[repr(C)]
4360#[derive(Debug, Copy, Clone)]
4361pub struct ZL_MIGraphDesc {
4362    pub CTid: ZL_IDType,
4363    pub inputTypes: *const ZL_Type,
4364    pub nbInputs: usize,
4365    pub lastInputIsVariable: ::std::os::raw::c_int,
4366    pub soTypes: *const ZL_Type,
4367    pub nbSOs: usize,
4368    pub voTypes: *const ZL_Type,
4369    pub nbVOs: usize,
4370}
4371#[test]
4372fn bindgen_test_layout_ZL_MIGraphDesc() {
4373    const UNINIT: ::std::mem::MaybeUninit<ZL_MIGraphDesc> = ::std::mem::MaybeUninit::uninit();
4374    let ptr = UNINIT.as_ptr();
4375    assert_eq!(
4376        ::std::mem::size_of::<ZL_MIGraphDesc>(),
4377        64usize,
4378        "Size of ZL_MIGraphDesc"
4379    );
4380    assert_eq!(
4381        ::std::mem::align_of::<ZL_MIGraphDesc>(),
4382        8usize,
4383        "Alignment of ZL_MIGraphDesc"
4384    );
4385    assert_eq!(
4386        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
4387        0usize,
4388        "Offset of field: ZL_MIGraphDesc::CTid"
4389    );
4390    assert_eq!(
4391        unsafe { ::std::ptr::addr_of!((*ptr).inputTypes) as usize - ptr as usize },
4392        8usize,
4393        "Offset of field: ZL_MIGraphDesc::inputTypes"
4394    );
4395    assert_eq!(
4396        unsafe { ::std::ptr::addr_of!((*ptr).nbInputs) as usize - ptr as usize },
4397        16usize,
4398        "Offset of field: ZL_MIGraphDesc::nbInputs"
4399    );
4400    assert_eq!(
4401        unsafe { ::std::ptr::addr_of!((*ptr).lastInputIsVariable) as usize - ptr as usize },
4402        24usize,
4403        "Offset of field: ZL_MIGraphDesc::lastInputIsVariable"
4404    );
4405    assert_eq!(
4406        unsafe { ::std::ptr::addr_of!((*ptr).soTypes) as usize - ptr as usize },
4407        32usize,
4408        "Offset of field: ZL_MIGraphDesc::soTypes"
4409    );
4410    assert_eq!(
4411        unsafe { ::std::ptr::addr_of!((*ptr).nbSOs) as usize - ptr as usize },
4412        40usize,
4413        "Offset of field: ZL_MIGraphDesc::nbSOs"
4414    );
4415    assert_eq!(
4416        unsafe { ::std::ptr::addr_of!((*ptr).voTypes) as usize - ptr as usize },
4417        48usize,
4418        "Offset of field: ZL_MIGraphDesc::voTypes"
4419    );
4420    assert_eq!(
4421        unsafe { ::std::ptr::addr_of!((*ptr).nbVOs) as usize - ptr as usize },
4422        56usize,
4423        "Offset of field: ZL_MIGraphDesc::nbVOs"
4424    );
4425}
4426#[repr(C)]
4427#[derive(Debug, Copy, Clone)]
4428pub struct ZL_MIEncoderDesc {
4429    pub gd: ZL_MIGraphDesc,
4430    pub transform_f: ZL_MIEncoderFn,
4431    pub localParams: ZL_LocalParams,
4432    pub name: *const ::std::os::raw::c_char,
4433    pub trStateMgr: ZL_CodecStateManager,
4434    #[doc = " Optionally an opaque pointer that can be queried with\n ZL_Encoder_getOpaquePtr().\n OpenZL unconditionally takes ownership of this pointer, even if\n registration fails, and it lives for the lifetime of the compressor."]
4435    pub opaque: ZL_OpaquePtr,
4436}
4437#[test]
4438fn bindgen_test_layout_ZL_MIEncoderDesc() {
4439    const UNINIT: ::std::mem::MaybeUninit<ZL_MIEncoderDesc> = ::std::mem::MaybeUninit::uninit();
4440    let ptr = UNINIT.as_ptr();
4441    assert_eq!(
4442        ::std::mem::size_of::<ZL_MIEncoderDesc>(),
4443        176usize,
4444        "Size of ZL_MIEncoderDesc"
4445    );
4446    assert_eq!(
4447        ::std::mem::align_of::<ZL_MIEncoderDesc>(),
4448        8usize,
4449        "Alignment of ZL_MIEncoderDesc"
4450    );
4451    assert_eq!(
4452        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
4453        0usize,
4454        "Offset of field: ZL_MIEncoderDesc::gd"
4455    );
4456    assert_eq!(
4457        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
4458        64usize,
4459        "Offset of field: ZL_MIEncoderDesc::transform_f"
4460    );
4461    assert_eq!(
4462        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
4463        72usize,
4464        "Offset of field: ZL_MIEncoderDesc::localParams"
4465    );
4466    assert_eq!(
4467        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
4468        120usize,
4469        "Offset of field: ZL_MIEncoderDesc::name"
4470    );
4471    assert_eq!(
4472        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
4473        128usize,
4474        "Offset of field: ZL_MIEncoderDesc::trStateMgr"
4475    );
4476    assert_eq!(
4477        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
4478        152usize,
4479        "Offset of field: ZL_MIEncoderDesc::opaque"
4480    );
4481}
4482extern "C" {
4483    #[doc = " Register a custom encoder that can be used to compress.\n\n @note This is a new variant of @ref ZL_Compressor_registerMIEncoder that\n reports errors using OpenZL's ZL_Report error system.\n\n @warning Using a custom encoder requires the decoder to be registered before\n decompression.\n\n @param desc The description of the encoder.\n\n @returns The new node ID, or an error."]
4484    pub fn ZL_Compressor_registerMIEncoder2(
4485        compressor: *mut ZL_Compressor,
4486        desc: *const ZL_MIEncoderDesc,
4487    ) -> ZL_Result_ZL_NodeID;
4488}
4489extern "C" {
4490    pub fn ZL_Compressor_registerMIEncoder(
4491        cgraph: *mut ZL_Compressor,
4492        ctd: *const ZL_MIEncoderDesc,
4493    ) -> ZL_NodeID;
4494}
4495extern "C" {
4496    #[doc = " Registration might fail, for example if the Descriptor is incorrectly filled.\n In which case, the returned nodeid is ZL_NODE_ILLEGAL.\n Any further operation attempted with such a Node will also fail.\n Such an outcome can be tested with ZL_NodeID_isValid().\n Note: this is mostly for debugging,\n once a Descriptor is valid, registration can be assumed to remain successful."]
4497    pub fn ZL_NodeID_isValid(nodeid: ZL_NodeID) -> ::std::os::raw::c_int;
4498}
4499extern "C" {
4500    pub fn ZL_Encoder_getCParam(eic: *const ZL_Encoder, gparam: ZL_CParam)
4501        -> ::std::os::raw::c_int;
4502}
4503extern "C" {
4504    pub fn ZL_Encoder_getLocalIntParam(
4505        eic: *const ZL_Encoder,
4506        intParamId: ::std::os::raw::c_int,
4507    ) -> ZL_IntParam;
4508}
4509extern "C" {
4510    pub fn ZL_Encoder_getLocalParam(
4511        eic: *const ZL_Encoder,
4512        paramId: ::std::os::raw::c_int,
4513    ) -> ZL_RefParam;
4514}
4515extern "C" {
4516    pub fn ZL_Encoder_getLocalCopyParam(
4517        eic: *const ZL_Encoder,
4518        copyParamId: ::std::os::raw::c_int,
4519    ) -> ZL_CopyParam;
4520}
4521extern "C" {
4522    pub fn ZL_Encoder_getLocalIntParams(eic: *const ZL_Encoder) -> ZL_LocalIntParams;
4523}
4524extern "C" {
4525    pub fn ZL_Encoder_getLocalParams(eic: *const ZL_Encoder) -> *const ZL_LocalParams;
4526}
4527extern "C" {
4528    pub fn ZL_Encoder_getScratchSpace(
4529        eic: *mut ZL_Encoder,
4530        size: usize,
4531    ) -> *mut ::std::os::raw::c_void;
4532}
4533extern "C" {
4534    pub fn ZL_Encoder_createTypedStream(
4535        eic: *mut ZL_Encoder,
4536        outcomeIndex: ::std::os::raw::c_int,
4537        eltsCapacity: usize,
4538        eltWidth: usize,
4539    ) -> *mut ZL_Output;
4540}
4541extern "C" {
4542    pub fn ZL_Encoder_createStringStream(
4543        eic: *mut ZL_Encoder,
4544        outcomeIndex: ::std::os::raw::c_int,
4545        nbStringsMax: usize,
4546        sumStringLensMax: usize,
4547    ) -> *mut ZL_Output;
4548}
4549extern "C" {
4550    pub fn ZL_Encoder_sendCodecHeader(
4551        ei: *mut ZL_Encoder,
4552        trh: *const ::std::os::raw::c_void,
4553        trhSize: usize,
4554    );
4555}
4556extern "C" {
4557    #[doc = " @returns Returns a state, as generated by the Transform's State Manager.\n The state's lifetime is managed by the host CCtx, it will be free\n automatically at end of CCtx lifetime (and can't be forcefully free\n manually). The state may be cached from a previous run with a compatible\n transform (same state signature)."]
4558    pub fn ZL_Encoder_getState(ei: *mut ZL_Encoder) -> *mut ::std::os::raw::c_void;
4559}
4560extern "C" {
4561    #[doc = " @returns The opaque pointer provided in the transform description.\n @warning Usage of the opaque pointer must be thread-safe, and must\n not not modify the state in any way that impacts encoding!"]
4562    pub fn ZL_Encoder_getOpaquePtr(eictx: *const ZL_Encoder) -> *const ::std::os::raw::c_void;
4563}
4564extern "C" {
4565    #[doc = " @brief Decompresses a frame hosting a single serialized output.\n\n @param dst Destination buffer for decompressed data\n @param dstCapacity Size of destination buffer in bytes\n @param src Source compressed data\n @param srcSize Size of source data in bytes\n @return Either an error (check with ZL_isError()) or decompressed size on\n success"]
4566    pub fn ZL_decompress(
4567        dst: *mut ::std::os::raw::c_void,
4568        dstCapacity: usize,
4569        src: *const ::std::os::raw::c_void,
4570        srcSize: usize,
4571    ) -> ZL_Report;
4572}
4573extern "C" {
4574    #[doc = " @brief Gets the decompressed size of content from a single-output frame.\n\n Useful to determine the size of buffer to allocate.\n\n @param compressed Pointer to compressed data\n @param cSize Size of compressed frame\nor at a minimum the size of the complete frame header\n @return Decompressed size in bytes, or error code\n\n @note Huge content sizes (> 4 GB) can't be represented on 32-bit systems\n @note For String type, @return size of all strings concatenated"]
4575    pub fn ZL_getDecompressedSize(
4576        compressed: *const ::std::os::raw::c_void,
4577        cSize: usize,
4578    ) -> ZL_Report;
4579}
4580extern "C" {
4581    #[doc = " @brief Gets the size of the compressed frame.\n        This method could be useful when the compressed frame only represents\n        a first portion of a larger buffer.\n\n @param compressed Pointer to compressed data.\n                   Must point at the start of a compressed frame.\n @param testedSize Size of data @p compressed points to.\n        To be useful, at a minimum, this size must be:\n        - frame header + chunk  header for version < ZL_CHUNK_VERSION_MIN.\n        - >= compressedSize for frames of versions >= ZL_CHUNK_VERSION_MIN.\n @return Compressed frame size in bytes, or error code\n\n @note Huge content sizes (> 4 GB) can't be represented on 32-bit systems"]
4582    pub fn ZL_getCompressedSize(
4583        compressed: *const ::std::os::raw::c_void,
4584        testedSize: usize,
4585    ) -> ZL_Report;
4586}
4587extern "C" {
4588    #[doc = " @brief Creates a new decompression context.\n\n @return Pointer to new context, or NULL on error"]
4589    pub fn ZL_DCtx_create() -> *mut ZL_DCtx;
4590}
4591extern "C" {
4592    #[doc = " @brief Frees a decompression context.\n\n @param dctx Decompression context to free"]
4593    pub fn ZL_DCtx_free(dctx: *mut ZL_DCtx);
4594}
4595#[doc = " @brief Keep parameters across decompression sessions.\n\n By default, parameters are reset between decompression sessions.\n Setting this parameter to 1 keeps the parameters across sessions."]
4596pub const ZL_DParam_stickyParameters: ZL_DParam = 1;
4597#[doc = " @brief Enable checking the checksum of the compressed frame.\n\n The following two parameters control whether checksums are checked during\n decompression. These checks can be disabled to achieve faster speeds in\n exchange for the risk of data corruption going unnoticed.\n\n Disabling these checks is more effective when decompression speed is\n already fast. Expected improvements: ~20-30% for speeds > 2GB/s, 10-15%\n for speeds between 1GB/s and 2GB/s, and 1-5% for speeds < 1GB/s.\n\n Valid values use the ZS2_GPARAM_* format.\n @note Default 0 currently means check the checksum, might change in\n future"]
4598pub const ZL_DParam_checkCompressedChecksum: ZL_DParam = 2;
4599#[doc = " @brief Enable checking the checksum of the uncompressed content.\n\n Valid values use the ZS2_GPARAM_* format.\n @note Default 0 currently means check the checksum, might change in\n future"]
4600pub const ZL_DParam_checkContentChecksum: ZL_DParam = 3;
4601#[doc = " @brief Global decompression parameters."]
4602pub type ZL_DParam = ::std::os::raw::c_uint;
4603extern "C" {
4604    #[doc = " @brief Sets global parameters via the decompression context.\n\n @param dctx Decompression context\n @param gdparam Parameter to set\n @param value Value to set for the parameter\n @return Error code or success\n\n @note By default, parameters are reset at end of decompression session.\n       To preserve them across sessions, set stickyParameters=1"]
4605    pub fn ZL_DCtx_setParameter(
4606        dctx: *mut ZL_DCtx,
4607        gdparam: ZL_DParam,
4608        value: ::std::os::raw::c_int,
4609    ) -> ZL_Report;
4610}
4611extern "C" {
4612    #[doc = " @brief Reads a parameter's configured value in the decompression context.\n\n @param dctx Decompression context\n @param gdparam Parameter to query\n @return The value set for the given parameter, or 0 if unset/nonexistent"]
4613    pub fn ZL_DCtx_getParameter(dctx: *const ZL_DCtx, gdparam: ZL_DParam) -> ::std::os::raw::c_int;
4614}
4615extern "C" {
4616    #[doc = " @brief Resets parameters selection from a blank slate.\n\n Useful when unsure if ZL_DParam_stickyParameters is set to 1.\n\n @param dctx Decompression context\n @return Error code or success"]
4617    pub fn ZL_DCtx_resetParameters(dctx: *mut ZL_DCtx) -> ZL_Report;
4618}
4619extern "C" {
4620    pub fn ZL_DCtx_setStreamArena(dctx: *mut ZL_DCtx, sat: ZL_DataArenaType) -> ZL_Report;
4621}
4622extern "C" {
4623    #[doc = " @brief Gets a verbose error string containing context about the error.\n\n Useful for debugging and submitting bug reports to OpenZL developers.\n\n @param dctx Decompression context\n @param report Error report to get context for\n @return Error context string\n\n @note String is stored within the dctx and is only valid for the lifetime of\n the dctx"]
4624    pub fn ZL_DCtx_getErrorContextString(
4625        dctx: *const ZL_DCtx,
4626        report: ZL_Report,
4627    ) -> *const ::std::os::raw::c_char;
4628}
4629extern "C" {
4630    #[doc = " @brief Gets error context string from error code.\n\n @param dctx Decompression context\n @param error Error code to get context for\n @return Error context string\n\n @note String is stored within the dctx and is only valid for the lifetime of\n the dctx"]
4631    pub fn ZL_DCtx_getErrorContextString_fromError(
4632        dctx: *const ZL_DCtx,
4633        error: ZL_Error,
4634    ) -> *const ::std::os::raw::c_char;
4635}
4636extern "C" {
4637    #[doc = " @brief Gets the array of warnings from the previous operation.\n\n @param dctx Decompression context\n @return Array of warnings encountered during the previous operation\n\n @note Array and errors' lifetimes are valid until the next non-const call on\n the DCtx"]
4638    pub fn ZL_DCtx_getWarnings(dctx: *const ZL_DCtx) -> ZL_Error_Array;
4639}
4640extern "C" {
4641    #[doc = " @brief Decompresses data with explicit state management.\n\n Same as ZL_decompress(), but with explicit state management.\n The state can be used to store advanced parameters.\n\n @param dctx Decompression context\n @param dst Destination buffer for decompressed data\n @param dstCapacity Size of destination buffer in bytes\n @param compressed Source compressed data\n @param cSize Size of compressed data in bytes\n @return Error code or decompressed size on success"]
4642    pub fn ZL_DCtx_decompress(
4643        dctx: *mut ZL_DCtx,
4644        dst: *mut ::std::os::raw::c_void,
4645        dstCapacity: usize,
4646        compressed: *const ::std::os::raw::c_void,
4647        cSize: usize,
4648    ) -> ZL_Report;
4649}
4650extern "C" {
4651    #[doc = " @brief Gets the number of outputs stored in a compressed frame.\n\n Doesn't need the whole frame, just enough to read the requested information.\n\n @param compressed Pointer to compressed data\n @param cSize Size of compressed data\n @return Number of outputs, or error on failure (invalid frame, size too\n small, etc.)"]
4652    pub fn ZL_getNumOutputs(compressed: *const ::std::os::raw::c_void, cSize: usize) -> ZL_Report;
4653}
4654extern "C" {
4655    #[doc = " @brief Gets the output type for single-output frames.\n\n Only works for single-output frames. Provides the type of the single output.\n\n @param stPtr Pointer to store the output type\n @param compressed Pointer to compressed data\n @param cSize Size of compressed data\n @return Error code or success\n\n @note Only works for single-output frames"]
4656    pub fn ZL_getOutputType(
4657        stPtr: *mut ZL_Type,
4658        compressed: *const ::std::os::raw::c_void,
4659        cSize: usize,
4660    ) -> ZL_Report;
4661}
4662#[repr(C)]
4663#[derive(Debug, Copy, Clone)]
4664pub struct ZL_FrameInfo {
4665    _unused: [u8; 0],
4666}
4667extern "C" {
4668    #[doc = " @brief Creates a frame information object from compressed data.\n\n @param compressed Pointer to compressed data\n @param cSize Size of compressed data\n @return Pointer to frame info object, or NULL on error"]
4669    pub fn ZL_FrameInfo_create(
4670        compressed: *const ::std::os::raw::c_void,
4671        cSize: usize,
4672    ) -> *mut ZL_FrameInfo;
4673}
4674extern "C" {
4675    #[doc = " @brief Frees a frame information object.\n\n @param fi Frame information object to free"]
4676    pub fn ZL_FrameInfo_free(fi: *mut ZL_FrameInfo);
4677}
4678extern "C" {
4679    #[doc = " @brief Gets the format version of the frame.\n\n @param fi Frame information object\n @return The version number, or error if unsupported or invalid"]
4680    pub fn ZL_FrameInfo_getFormatVersion(fi: *const ZL_FrameInfo) -> ZL_Report;
4681}
4682extern "C" {
4683    #[doc = " @brief Gets the number of regenerated outputs on decompression.\n\n @param fi Frame information object\n @return The number of outputs on decompression"]
4684    pub fn ZL_FrameInfo_getNumOutputs(fi: *const ZL_FrameInfo) -> ZL_Report;
4685}
4686extern "C" {
4687    #[doc = " @brief Gets the output type for a specific output ID.\n\n @param fi Frame information object\n @param outputID Output ID (starts at 0, single output has ID 0)\n @return Output type, or error code"]
4688    pub fn ZL_FrameInfo_getOutputType(
4689        fi: *const ZL_FrameInfo,
4690        outputID: ::std::os::raw::c_int,
4691    ) -> ZL_Report;
4692}
4693extern "C" {
4694    #[doc = " @brief Gets the decompressed size of a specific output.\n\n @param fi Frame information object\n @param outputID Output ID (starts at 0)\n @return Size of specified output in bytes, or error code"]
4695    pub fn ZL_FrameInfo_getDecompressedSize(
4696        fi: *const ZL_FrameInfo,
4697        outputID: ::std::os::raw::c_int,
4698    ) -> ZL_Report;
4699}
4700extern "C" {
4701    #[doc = " @brief Gets the number of elements in a specific output.\n\n @param fi Frame information object\n @param outputID Output ID (starts at 0)\n @return Number of elements in specified output, or error code"]
4702    pub fn ZL_FrameInfo_getNumElts(
4703        fi: *const ZL_FrameInfo,
4704        outputID: ::std::os::raw::c_int,
4705    ) -> ZL_Report;
4706}
4707#[doc = " @brief Information about a decompressed typed output."]
4708#[repr(C)]
4709#[derive(Debug, Copy, Clone)]
4710pub struct ZL_OutputInfo {
4711    #[doc = "< Type of the output"]
4712    pub type_: ZL_Type,
4713    #[doc = "< width of elements in bytes"]
4714    pub fixedWidth: u32,
4715    #[doc = "< Decompressed size in bytes"]
4716    pub decompressedByteSize: u64,
4717    #[doc = "< Number of elements"]
4718    pub numElts: u64,
4719}
4720#[test]
4721fn bindgen_test_layout_ZL_OutputInfo() {
4722    const UNINIT: ::std::mem::MaybeUninit<ZL_OutputInfo> = ::std::mem::MaybeUninit::uninit();
4723    let ptr = UNINIT.as_ptr();
4724    assert_eq!(
4725        ::std::mem::size_of::<ZL_OutputInfo>(),
4726        24usize,
4727        "Size of ZL_OutputInfo"
4728    );
4729    assert_eq!(
4730        ::std::mem::align_of::<ZL_OutputInfo>(),
4731        8usize,
4732        "Alignment of ZL_OutputInfo"
4733    );
4734    assert_eq!(
4735        unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
4736        0usize,
4737        "Offset of field: ZL_OutputInfo::type_"
4738    );
4739    assert_eq!(
4740        unsafe { ::std::ptr::addr_of!((*ptr).fixedWidth) as usize - ptr as usize },
4741        4usize,
4742        "Offset of field: ZL_OutputInfo::fixedWidth"
4743    );
4744    assert_eq!(
4745        unsafe { ::std::ptr::addr_of!((*ptr).decompressedByteSize) as usize - ptr as usize },
4746        8usize,
4747        "Offset of field: ZL_OutputInfo::decompressedByteSize"
4748    );
4749    assert_eq!(
4750        unsafe { ::std::ptr::addr_of!((*ptr).numElts) as usize - ptr as usize },
4751        16usize,
4752        "Offset of field: ZL_OutputInfo::numElts"
4753    );
4754}
4755extern "C" {
4756    #[doc = " @brief Decompresses typed content from frames with a single typed output\n        into a pre-allocated buffer @p dst .\n        Information about output type is written into @p outputInfo .\n\n @param dctx Decompression context\n @param outputInfo Output metadata filled on success\n @param dst Destination buffer (must be large enough)\n @param dstByteCapacity Size of destination buffer in bytes\n @param compressed Pointer to compressed data\n @param cSize Size of compressed data in bytes\n @return Error code or success\n\n @note Only works for frames with a single typed output,\n       and even then, does not work for String type.\n @note For Numeric type, dst must be correctly aligned (if unknown, assume\n 64-bit numeric)\n @note Numeric values are written using host's endianness\n @note On error, @p outputInfo content is undefined and should not be read"]
4757    pub fn ZL_DCtx_decompressTyped(
4758        dctx: *mut ZL_DCtx,
4759        outputInfo: *mut ZL_OutputInfo,
4760        dst: *mut ::std::os::raw::c_void,
4761        dstByteCapacity: usize,
4762        compressed: *const ::std::os::raw::c_void,
4763        cSize: usize,
4764    ) -> ZL_Report;
4765}
4766#[doc = " @brief Typed buffer object that can own and auto-size their buffers.\n\n TypedBuffer uses standard C malloc/free to allocate buffers.\n Future versions could allow insertion of a custom allocator."]
4767pub type ZL_TypedBuffer = ZL_Output;
4768extern "C" {
4769    #[doc = " @brief Creates an empty typed buffer object.\n\n On creation, the TypedBuffer object is empty.\n By default, when provided as an empty shell,\n it will automatically allocate and fill its own buffer\n during invocation of ZL_DCtx_decompressTBuffer().\n A TypedBuffer object is not reusable and must be freed after usage.\n Releasing the object also releases its owned buffers.\n\n @return Pointer to new typed buffer, or NULL on error"]
4770    pub fn ZL_TypedBuffer_create() -> *mut ZL_TypedBuffer;
4771}
4772extern "C" {
4773    #[doc = " @brief Frees a typed buffer object.\n\n @param tbuffer Typed buffer to free"]
4774    pub fn ZL_TypedBuffer_free(tbuffer: *mut ZL_TypedBuffer);
4775}
4776extern "C" {
4777    #[doc = " @brief Creates a pre-allocated typed buffer for serial data.\n\n The object will use the referenced buffer, and not allocate its own one.\n It will be filled during invocation of ZL_DCtx_decompressTBuffer().\n Releasing the ZL_TypedBuffer object will not release the referenced buffer.\n\n @param buffer buffer to write into\n @param bufferCapacity maximum size to write into buffer\n @return Pointer to wrapped typed buffer, or NULL on error"]
4778    pub fn ZL_TypedBuffer_createWrapSerial(
4779        buffer: *mut ::std::os::raw::c_void,
4780        bufferCapacity: usize,
4781    ) -> *mut ZL_TypedBuffer;
4782}
4783extern "C" {
4784    #[doc = " @brief Creates a pre-allocated typed buffer for struct data.\n\n @param structBuffer buffer to write struct into.\n        Its size must be at least @p structWidth * @p structCapacity\n @param structWidth Width of each struct in bytes\n @param structCapacity Maximum number of struct that can be written into @p\n structBuffer\n @return Pointer to wrapped typed buffer, or NULL on error"]
4785    pub fn ZL_TypedBuffer_createWrapStruct(
4786        structBuffer: *mut ::std::os::raw::c_void,
4787        structWidth: usize,
4788        numStructs: usize,
4789    ) -> *mut ZL_TypedBuffer;
4790}
4791extern "C" {
4792    #[doc = " @brief Creates a pre-allocated typed buffer for numeric data.\n\n @param numArray buffer to write the array of numeric values into\n        The array size must be >= @p numWidth * @p numCapacity.\n        It must also be correctly aligned for the numeric width requested.\n @param numWidth Width of numeric values in bytes\n @param numCapacity Maximum number of numeric value that can be written into\n @p numArray\n @return Pointer to wrapped typed buffer, or NULL on error"]
4793    pub fn ZL_TypedBuffer_createWrapNumeric(
4794        numArray: *mut ::std::os::raw::c_void,
4795        numWidth: usize,
4796        numCapacity: usize,
4797    ) -> *mut ZL_TypedBuffer;
4798}
4799extern "C" {
4800    #[doc = " @brief Creates a pre-allocated ZL_TypedBuffer for String data.\n\n @param stringBuffer The buffer where the concatenation of all Strings will be\n written.\n @param stringBufferCapacity Size of stringBuffer\n @param lenBuffer Buffer for the array of lengths, which are 32-bit unsigned.\n @param maxNumStrings Maximum number of strings that can be written.\n @return Pointer to wrapped typed buffer, or NULL on error"]
4801    pub fn ZL_TypedBuffer_createWrapString(
4802        stringBuffer: *mut ::std::os::raw::c_void,
4803        stringBufferCapacity: usize,
4804        lenBuffer: *mut u32,
4805        maxNumStrings: usize,
4806    ) -> *mut ZL_TypedBuffer;
4807}
4808extern "C" {
4809    #[doc = " @brief Decompresses a frame with a single typed output into a TypedBuffer.\n\n This prototype works for frames with a single typed output only.\n Data will be decompressed into the output buffer.\n\n @param dctx Decompression context\n @param output TypedBuffer object (must be created first)\n @param compressed Pointer to compressed data\n @param cSize Size of compressed data in bytes\n @return Error code or size in bytes of the main buffer inside output\n\n @note Output is filled on success, but undefined on error, and can only be\n free() in this case.\n @note ZL_TypedBuffer object is required to decompress String type"]
4810    pub fn ZL_DCtx_decompressTBuffer(
4811        dctx: *mut ZL_DCtx,
4812        output: *mut ZL_TypedBuffer,
4813        compressed: *const ::std::os::raw::c_void,
4814        cSize: usize,
4815    ) -> ZL_Report;
4816}
4817extern "C" {
4818    #[doc = " @brief Decompresses a frame into multiple TypedBuffers.\n\n @param dctx Decompression context\n @param outputs Array of ZL_TypedBuffer* objects (must be created using\n                ZL_TypedBuffer_create or pre-allocated creation methods)\n @param nbOutputs Exact number of outputs expected from the frame\n                  (can be obtained from ZL_FrameInfo_getNumOutputs())\n @param compressed Pointer to compressed data\n @param cSize Size of compressed data in bytes\n @return Error code or number of decompressed TypedBuffers\n\n @note Requires exact number of outputs (not permissive)\n @note @p outputs are filled on success, but undefined on error\n @note TypedBuffer lifetimes are controlled by the caller"]
4819    pub fn ZL_DCtx_decompressMultiTBuffer(
4820        dctx: *mut ZL_DCtx,
4821        outputs: *mut *mut ZL_TypedBuffer,
4822        nbOutputs: usize,
4823        compressed: *const ::std::os::raw::c_void,
4824        cSize: usize,
4825    ) -> ZL_Report;
4826}
4827extern "C" {
4828    #[doc = " @brief Gets the type of the typed buffer.\n\n @param tbuffer Typed buffer object\n @return Type of the buffer"]
4829    pub fn ZL_TypedBuffer_type(tbuffer: *const ZL_TypedBuffer) -> ZL_Type;
4830}
4831extern "C" {
4832    #[doc = " @brief Gets the number of bytes written into the internal buffer.\n\n @param tbuffer Typed buffer object\n @return Number of bytes in the internal buffer.\n\n @note Generally equals eltWidth * nbElts,\n       but for String type equals sum(stringLens)\n @note ZL_DCtx_decompressTBuffer() returns the same value"]
4833    pub fn ZL_TypedBuffer_byteSize(tbuffer: *const ZL_TypedBuffer) -> usize;
4834}
4835extern "C" {
4836    #[doc = " @brief Gets direct access to the internal buffer for reading operation.\n\n @param tbuffer Typed buffer object\n @return Pointer to the beginning of buffer (for String type, points at the\n beginning of the first string).\n\n @warning Users must pay attention to buffer boundaries\n @note Buffer size is provided by ZL_TypedBuffer_byteSize()"]
4837    pub fn ZL_TypedBuffer_rPtr(tbuffer: *const ZL_TypedBuffer) -> *const ::std::os::raw::c_void;
4838}
4839extern "C" {
4840    #[doc = " @brief Gets the number of elements in the typed buffer.\n\n @param tbuffer Typed buffer object\n @return Number of elements in the buffer\n\n @note for Serial type, this is the number of bytes."]
4841    pub fn ZL_TypedBuffer_numElts(tbuffer: *const ZL_TypedBuffer) -> usize;
4842}
4843extern "C" {
4844    #[doc = " @brief Gets the size of each element for fixed-size types.\n\n @param tbuffer Typed buffer object\n @return Size of each element in bytes, or 0 for String type\n\n @note Not valid for String type (returns 0)"]
4845    pub fn ZL_TypedBuffer_eltWidth(tbuffer: *const ZL_TypedBuffer) -> usize;
4846}
4847extern "C" {
4848    #[doc = " @brief Gets pointer to the array of string lengths.\n\n @param tbuffer Typed buffer object\n @return Pointer to beginning of string lengths array, or NULL if incorrect\n type\n\n @note **Only valid for String type**\n @note Array size equals ZL_TypedBuffer_numElts()"]
4849    pub fn ZL_TypedBuffer_rStringLens(tbuffer: *const ZL_TypedBuffer) -> *const u32;
4850}
4851extern "C" {
4852    #[doc = " @brief Gets the size of the OpenZL header.\n\n Useful to determine header overhead.\n\n @param src Source compressed data\n @param srcSize Size of source data\n @return Header size in bytes, or error code\n\n @note This is a temporary function, not guaranteed to remain in future\n versions"]
4853    pub fn ZL_getHeaderSize(src: *const ::std::os::raw::c_void, srcSize: usize) -> ZL_Report;
4854}
4855pub type ZL_PipeDecoderFn = ::std::option::Option<
4856    unsafe extern "C" fn(
4857        dst: *mut ::std::os::raw::c_void,
4858        dstCapacity: usize,
4859        src: *const ::std::os::raw::c_void,
4860        srcSize: usize,
4861    ) -> usize,
4862>;
4863#[repr(C)]
4864#[derive(Debug, Copy, Clone)]
4865pub struct ZL_PipeDecoderDesc {
4866    pub CTid: ZL_IDType,
4867    pub dstBound_f: ZL_PipeDstCapacityFn,
4868    pub transform_f: ZL_PipeDecoderFn,
4869    pub name: *const ::std::os::raw::c_char,
4870}
4871#[test]
4872fn bindgen_test_layout_ZL_PipeDecoderDesc() {
4873    const UNINIT: ::std::mem::MaybeUninit<ZL_PipeDecoderDesc> = ::std::mem::MaybeUninit::uninit();
4874    let ptr = UNINIT.as_ptr();
4875    assert_eq!(
4876        ::std::mem::size_of::<ZL_PipeDecoderDesc>(),
4877        32usize,
4878        "Size of ZL_PipeDecoderDesc"
4879    );
4880    assert_eq!(
4881        ::std::mem::align_of::<ZL_PipeDecoderDesc>(),
4882        8usize,
4883        "Alignment of ZL_PipeDecoderDesc"
4884    );
4885    assert_eq!(
4886        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
4887        0usize,
4888        "Offset of field: ZL_PipeDecoderDesc::CTid"
4889    );
4890    assert_eq!(
4891        unsafe { ::std::ptr::addr_of!((*ptr).dstBound_f) as usize - ptr as usize },
4892        8usize,
4893        "Offset of field: ZL_PipeDecoderDesc::dstBound_f"
4894    );
4895    assert_eq!(
4896        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
4897        16usize,
4898        "Offset of field: ZL_PipeDecoderDesc::transform_f"
4899    );
4900    assert_eq!(
4901        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
4902        24usize,
4903        "Offset of field: ZL_PipeDecoderDesc::name"
4904    );
4905}
4906extern "C" {
4907    #[doc = " Register a custom decoder transform, should it be needed during\n decompression of a zstrong frame.\n A decoder transform is expected to reverse the encoding transform of same\n @CTid.\n This function is specialized for the registration of simple pipe decoder\n transforms. Counterpart to ZL_Compressor_registerPipeEncoder()."]
4908    pub fn ZL_DCtx_registerPipeDecoder(
4909        dctx: *mut ZL_DCtx,
4910        dtd: *const ZL_PipeDecoderDesc,
4911    ) -> ZL_Report;
4912}
4913pub type ZL_SplitDstCapacityFn =
4914    ::std::option::Option<unsafe extern "C" fn(src: *const ZL_RBuffer) -> usize>;
4915pub type ZL_SplitDecoderFn =
4916    ::std::option::Option<unsafe extern "C" fn(dst: ZL_WBuffer, src: *const ZL_RBuffer) -> usize>;
4917#[repr(C)]
4918#[derive(Debug, Copy, Clone)]
4919pub struct ZL_SplitDecoderDesc {
4920    pub CTid: ZL_IDType,
4921    pub nbInputStreams: usize,
4922    pub dstBound_f: ZL_SplitDstCapacityFn,
4923    pub transform_f: ZL_SplitDecoderFn,
4924    pub name: *const ::std::os::raw::c_char,
4925}
4926#[test]
4927fn bindgen_test_layout_ZL_SplitDecoderDesc() {
4928    const UNINIT: ::std::mem::MaybeUninit<ZL_SplitDecoderDesc> = ::std::mem::MaybeUninit::uninit();
4929    let ptr = UNINIT.as_ptr();
4930    assert_eq!(
4931        ::std::mem::size_of::<ZL_SplitDecoderDesc>(),
4932        40usize,
4933        "Size of ZL_SplitDecoderDesc"
4934    );
4935    assert_eq!(
4936        ::std::mem::align_of::<ZL_SplitDecoderDesc>(),
4937        8usize,
4938        "Alignment of ZL_SplitDecoderDesc"
4939    );
4940    assert_eq!(
4941        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
4942        0usize,
4943        "Offset of field: ZL_SplitDecoderDesc::CTid"
4944    );
4945    assert_eq!(
4946        unsafe { ::std::ptr::addr_of!((*ptr).nbInputStreams) as usize - ptr as usize },
4947        8usize,
4948        "Offset of field: ZL_SplitDecoderDesc::nbInputStreams"
4949    );
4950    assert_eq!(
4951        unsafe { ::std::ptr::addr_of!((*ptr).dstBound_f) as usize - ptr as usize },
4952        16usize,
4953        "Offset of field: ZL_SplitDecoderDesc::dstBound_f"
4954    );
4955    assert_eq!(
4956        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
4957        24usize,
4958        "Offset of field: ZL_SplitDecoderDesc::transform_f"
4959    );
4960    assert_eq!(
4961        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
4962        32usize,
4963        "Offset of field: ZL_SplitDecoderDesc::name"
4964    );
4965}
4966extern "C" {
4967    #[doc = " Register a custom split decoder transform.\n This is supposed to be the reverse of the encoding transform of same @CTid.\n Counterpart to ZS2_registerSplitTransform()."]
4968    pub fn ZL_DCtx_registerSplitDecoder(
4969        dctx: *mut ZL_DCtx,
4970        dtd: *const ZL_SplitDecoderDesc,
4971    ) -> ZL_Report;
4972}
4973pub type ZL_TypedDecoderFn = ::std::option::Option<
4974    unsafe extern "C" fn(dictx: *mut ZL_Decoder, src: *mut *const ZL_Input) -> ZL_Report,
4975>;
4976#[repr(C)]
4977#[derive(Debug, Copy, Clone)]
4978pub struct ZL_TypedDecoderDesc {
4979    pub gd: ZL_TypedGraphDesc,
4980    pub transform_f: ZL_TypedDecoderFn,
4981    pub name: *const ::std::os::raw::c_char,
4982    pub trStateMgr: ZL_CodecStateManager,
4983    #[doc = " Optionally an opaque pointer that can be queried with\n ZL_Decoder_getOpaquePtr().\n OpenZL unconditionally takes ownership of this pointer, even if\n registration fails, and it lives for the lifetime of the dctx."]
4984    pub opaque: ZL_OpaquePtr,
4985}
4986#[test]
4987fn bindgen_test_layout_ZL_TypedDecoderDesc() {
4988    const UNINIT: ::std::mem::MaybeUninit<ZL_TypedDecoderDesc> = ::std::mem::MaybeUninit::uninit();
4989    let ptr = UNINIT.as_ptr();
4990    assert_eq!(
4991        ::std::mem::size_of::<ZL_TypedDecoderDesc>(),
4992        88usize,
4993        "Size of ZL_TypedDecoderDesc"
4994    );
4995    assert_eq!(
4996        ::std::mem::align_of::<ZL_TypedDecoderDesc>(),
4997        8usize,
4998        "Alignment of ZL_TypedDecoderDesc"
4999    );
5000    assert_eq!(
5001        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
5002        0usize,
5003        "Offset of field: ZL_TypedDecoderDesc::gd"
5004    );
5005    assert_eq!(
5006        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
5007        24usize,
5008        "Offset of field: ZL_TypedDecoderDesc::transform_f"
5009    );
5010    assert_eq!(
5011        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
5012        32usize,
5013        "Offset of field: ZL_TypedDecoderDesc::name"
5014    );
5015    assert_eq!(
5016        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
5017        40usize,
5018        "Offset of field: ZL_TypedDecoderDesc::trStateMgr"
5019    );
5020    assert_eq!(
5021        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
5022        64usize,
5023        "Offset of field: ZL_TypedDecoderDesc::opaque"
5024    );
5025}
5026extern "C" {
5027    #[doc = " Register a custom typed decoder transform.\n Counterpart to ZS2_registerTypedTransform().\n\n Note: Split transforms and Pipe Transforms\n can be converted into Typed transforms, since it's a strict superset."]
5028    pub fn ZL_DCtx_registerTypedDecoder(
5029        dctx: *mut ZL_DCtx,
5030        dtd: *const ZL_TypedDecoderDesc,
5031    ) -> ZL_Report;
5032}
5033pub type ZL_VODecoderFn = ::std::option::Option<
5034    unsafe extern "C" fn(
5035        dictx: *mut ZL_Decoder,
5036        compulsorySrcs: *mut *const ZL_Input,
5037        nbCompulsorySrcs: usize,
5038        variableSrcs: *mut *const ZL_Input,
5039        nbVariableSrcs: usize,
5040    ) -> ZL_Report,
5041>;
5042#[repr(C)]
5043#[derive(Debug, Copy, Clone)]
5044pub struct ZL_VODecoderDesc {
5045    pub gd: ZL_VOGraphDesc,
5046    pub transform_f: ZL_VODecoderFn,
5047    pub name: *const ::std::os::raw::c_char,
5048    pub trStateMgr: ZL_CodecStateManager,
5049    #[doc = " Optionally an opaque pointer that can be queried with\n ZL_Decoder_getOpaquePtr().\n OpenZL unconditionally takes ownership of this pointer, even if\n registration fails, and it lives for the lifetime of the dctx."]
5050    pub opaque: ZL_OpaquePtr,
5051}
5052#[test]
5053fn bindgen_test_layout_ZL_VODecoderDesc() {
5054    const UNINIT: ::std::mem::MaybeUninit<ZL_VODecoderDesc> = ::std::mem::MaybeUninit::uninit();
5055    let ptr = UNINIT.as_ptr();
5056    assert_eq!(
5057        ::std::mem::size_of::<ZL_VODecoderDesc>(),
5058        104usize,
5059        "Size of ZL_VODecoderDesc"
5060    );
5061    assert_eq!(
5062        ::std::mem::align_of::<ZL_VODecoderDesc>(),
5063        8usize,
5064        "Alignment of ZL_VODecoderDesc"
5065    );
5066    assert_eq!(
5067        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
5068        0usize,
5069        "Offset of field: ZL_VODecoderDesc::gd"
5070    );
5071    assert_eq!(
5072        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
5073        40usize,
5074        "Offset of field: ZL_VODecoderDesc::transform_f"
5075    );
5076    assert_eq!(
5077        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
5078        48usize,
5079        "Offset of field: ZL_VODecoderDesc::name"
5080    );
5081    assert_eq!(
5082        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
5083        56usize,
5084        "Offset of field: ZL_VODecoderDesc::trStateMgr"
5085    );
5086    assert_eq!(
5087        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
5088        80usize,
5089        "Offset of field: ZL_VODecoderDesc::opaque"
5090    );
5091}
5092extern "C" {
5093    #[doc = " Register a variable output decoder transform.\n Counterpart to ZS2_registerVOTransform()."]
5094    pub fn ZL_DCtx_registerVODecoder(dctx: *mut ZL_DCtx, dtd: *const ZL_VODecoderDesc)
5095        -> ZL_Report;
5096}
5097pub type ZL_MIDecoderFn = ::std::option::Option<
5098    unsafe extern "C" fn(
5099        dictx: *mut ZL_Decoder,
5100        compulsorySrcs: *mut *const ZL_Input,
5101        nbCompulsorySrcs: usize,
5102        variableSrcs: *mut *const ZL_Input,
5103        nbVariableSrcs: usize,
5104    ) -> ZL_Report,
5105>;
5106#[repr(C)]
5107#[derive(Debug, Copy, Clone)]
5108pub struct ZL_MIDecoderDesc {
5109    pub gd: ZL_MIGraphDesc,
5110    pub transform_f: ZL_MIDecoderFn,
5111    pub name: *const ::std::os::raw::c_char,
5112    pub trStateMgr: ZL_CodecStateManager,
5113    #[doc = " Optionally an opaque pointer that can be queried with\n ZL_Decoder_getOpaquePtr().\n OpenZL unconditionally takes ownership of this pointer, even if\n registration fails, and it lives for the lifetime of the dctx."]
5114    pub opaque: ZL_OpaquePtr,
5115}
5116#[test]
5117fn bindgen_test_layout_ZL_MIDecoderDesc() {
5118    const UNINIT: ::std::mem::MaybeUninit<ZL_MIDecoderDesc> = ::std::mem::MaybeUninit::uninit();
5119    let ptr = UNINIT.as_ptr();
5120    assert_eq!(
5121        ::std::mem::size_of::<ZL_MIDecoderDesc>(),
5122        128usize,
5123        "Size of ZL_MIDecoderDesc"
5124    );
5125    assert_eq!(
5126        ::std::mem::align_of::<ZL_MIDecoderDesc>(),
5127        8usize,
5128        "Alignment of ZL_MIDecoderDesc"
5129    );
5130    assert_eq!(
5131        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
5132        0usize,
5133        "Offset of field: ZL_MIDecoderDesc::gd"
5134    );
5135    assert_eq!(
5136        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
5137        64usize,
5138        "Offset of field: ZL_MIDecoderDesc::transform_f"
5139    );
5140    assert_eq!(
5141        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
5142        72usize,
5143        "Offset of field: ZL_MIDecoderDesc::name"
5144    );
5145    assert_eq!(
5146        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
5147        80usize,
5148        "Offset of field: ZL_MIDecoderDesc::trStateMgr"
5149    );
5150    assert_eq!(
5151        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
5152        104usize,
5153        "Offset of field: ZL_MIDecoderDesc::opaque"
5154    );
5155}
5156extern "C" {
5157    #[doc = " Register an MI decoder transform.\n Counterpart to ZS2_registerMITransform()."]
5158    pub fn ZL_DCtx_registerMIDecoder(dctx: *mut ZL_DCtx, dtd: *const ZL_MIDecoderDesc)
5159        -> ZL_Report;
5160}
5161extern "C" {
5162    pub fn ZL_Decoder_getScratchSpace(
5163        dictx: *mut ZL_Decoder,
5164        size: usize,
5165    ) -> *mut ::std::os::raw::c_void;
5166}
5167extern "C" {
5168    pub fn ZL_Decoder_create1OutStream(
5169        dictx: *mut ZL_Decoder,
5170        eltsCapacity: usize,
5171        eltWidth: usize,
5172    ) -> *mut ZL_Output;
5173}
5174extern "C" {
5175    pub fn ZL_Decoder_create1StringStream(
5176        dictx: *mut ZL_Decoder,
5177        nbStringsMax: usize,
5178        sumStringLensMax: usize,
5179    ) -> *mut ZL_Output;
5180}
5181extern "C" {
5182    pub fn ZL_Decoder_createTypedStream(
5183        dictx: *mut ZL_Decoder,
5184        index: ::std::os::raw::c_int,
5185        eltsCapacity: usize,
5186        eltWidth: usize,
5187    ) -> *mut ZL_Output;
5188}
5189extern "C" {
5190    pub fn ZL_Decoder_createStringStream(
5191        dictx: *mut ZL_Decoder,
5192        index: ::std::os::raw::c_int,
5193        nbStringsMax: usize,
5194        sumStringLensMax: usize,
5195    ) -> *mut ZL_Output;
5196}
5197extern "C" {
5198    pub fn ZL_Decoder_getCodecHeader(dictx: *const ZL_Decoder) -> ZL_RBuffer;
5199}
5200extern "C" {
5201    #[doc = " @returns The opaque pointer provided in the transform description.\n @warning Usage of the opaque pointer must be thread-safe, and must\n not not modify the state in any way that impacts decoding!"]
5202    pub fn ZL_Decoder_getOpaquePtr(dictx: *const ZL_Decoder) -> *const ::std::os::raw::c_void;
5203}
5204extern "C" {
5205    #[doc = " @returns Returns a state, as generated by the Transform's State Manager."]
5206    pub fn ZL_Decoder_getState(dictx: *const ZL_Decoder) -> *mut ::std::os::raw::c_void;
5207}
5208pub const ZL_GraphType_standard: ZL_GraphType = 0;
5209pub const ZL_GraphType_static: ZL_GraphType = 1;
5210pub const ZL_GraphType_selector: ZL_GraphType = 2;
5211pub const ZL_GraphType_function: ZL_GraphType = 3;
5212pub const ZL_GraphType_multiInput: ZL_GraphType = 4;
5213pub const ZL_GraphType_parameterized: ZL_GraphType = 5;
5214pub const ZL_GraphType_segmenter: ZL_GraphType = 6;
5215pub type ZL_GraphType = ::std::os::raw::c_uint;
5216pub type ZL_Compressor_ForEachGraphCallback = ::std::option::Option<
5217    unsafe extern "C" fn(
5218        opaque: *mut ::std::os::raw::c_void,
5219        compressor: *const ZL_Compressor,
5220        graphID: ZL_GraphID,
5221    ) -> ZL_Report,
5222>;
5223extern "C" {
5224    #[doc = " Calls @p callback on every graph registered in the @p compressor.\n If @p callback returns an error, short-circuit and return that error.\n @returns Success if all callbacks succeed, or the first error.\n @note The callback will not be called on standard graphs, since they\n aren't registered in the @p compressor."]
5225    pub fn ZL_Compressor_forEachGraph(
5226        compressor: *const ZL_Compressor,
5227        callback: ZL_Compressor_ForEachGraphCallback,
5228        opaque: *mut ::std::os::raw::c_void,
5229    ) -> ZL_Report;
5230}
5231pub type ZL_Compressor_ForEachNodeCallback = ::std::option::Option<
5232    unsafe extern "C" fn(
5233        opaque: *mut ::std::os::raw::c_void,
5234        compressor: *const ZL_Compressor,
5235        graphID: ZL_NodeID,
5236    ) -> ZL_Report,
5237>;
5238extern "C" {
5239    #[doc = " Calls @p callback on every node registered in the @p compressor.\n If @p callback returns an error, short-circuit and return that error.\n @returns Success if all callbacks succeed, or the first error.\n @note The callback will not be called on standard nodes, since they\n aren't registered in the @p compressor."]
5240    pub fn ZL_Compressor_forEachNode(
5241        compressor: *const ZL_Compressor,
5242        callback: ZL_Compressor_ForEachNodeCallback,
5243        opaque: *mut ::std::os::raw::c_void,
5244    ) -> ZL_Report;
5245}
5246pub type ZL_Compressor_ForEachParamCallback = ::std::option::Option<
5247    unsafe extern "C" fn(
5248        opaque: *mut ::std::os::raw::c_void,
5249        param: ZL_CParam,
5250        val: ::std::os::raw::c_int,
5251    ) -> ZL_Report,
5252>;
5253extern "C" {
5254    #[doc = " Calls @p callback on every param set in the @p compressor.\n If @p callback returns an error, short-circuit and return that error.\n @returns Success if all callbacks succeed, or the first error.\n @note The callback will not be called on params that are equal to\n the default value (0)."]
5255    pub fn ZL_Compressor_forEachParam(
5256        compressor: *const ZL_Compressor,
5257        callback: ZL_Compressor_ForEachParamCallback,
5258        opaque: *mut ::std::os::raw::c_void,
5259    ) -> ZL_Report;
5260}
5261extern "C" {
5262    #[doc = " @param[out] graphID If the function returns true, filled with\n the starting GraphID, otherwise filled with ZL_GRAPH_ILLEGAL.\n @returns True iff the compressor has the starting GraphID set."]
5263    pub fn ZL_Compressor_getStartingGraphID(
5264        compressor: *const ZL_Compressor,
5265        graphID: *mut ZL_GraphID,
5266    ) -> bool;
5267}
5268extern "C" {
5269    #[doc = " @returns The @ref ZL_GraphType of the given graph.\n @note This is the original type the graph was registered with."]
5270    pub fn ZL_Compressor_getGraphType(
5271        compressor: *const ZL_Compressor,
5272        graph: ZL_GraphID,
5273    ) -> ZL_GraphType;
5274}
5275extern "C" {
5276    #[doc = " @returns the (optional) @p name given to this graphid.\n When none provided, returns \"\".\n When graphid is illegal (invalid), returns NULL."]
5277    pub fn ZL_Compressor_Graph_getName(
5278        cgraph: *const ZL_Compressor,
5279        graphid: ZL_GraphID,
5280    ) -> *const ::std::os::raw::c_char;
5281}
5282extern "C" {
5283    #[doc = " @returns The input stream types that @p graphid is compatible with.\n @pre @p graph must be valid, and must have a single input stream"]
5284    pub fn ZL_Compressor_Graph_getInput0Mask(
5285        cgraph: *const ZL_Compressor,
5286        graphid: ZL_GraphID,
5287    ) -> ZL_Type;
5288}
5289extern "C" {
5290    #[doc = " @returns The input stream types that @p graphid input @p inputIdx is\n compatible with."]
5291    pub fn ZL_Compressor_Graph_getInputMask(
5292        compressor: *const ZL_Compressor,
5293        graphid: ZL_GraphID,
5294        inputIdx: usize,
5295    ) -> ZL_Type;
5296}
5297extern "C" {
5298    #[doc = " @returns The number of input streams that @p graphid expects."]
5299    pub fn ZL_Compressor_Graph_getNumInputs(
5300        compressor: *const ZL_Compressor,
5301        graphid: ZL_GraphID,
5302    ) -> usize;
5303}
5304extern "C" {
5305    #[doc = " @returns True if @p graphid is a multi input graph whose last\n input may show up zero or more times."]
5306    pub fn ZL_Compressor_Graph_isVariableInput(
5307        compressor: *const ZL_Compressor,
5308        graphid: ZL_GraphID,
5309    ) -> bool;
5310}
5311extern "C" {
5312    #[doc = " @returns The head node of the graph if @p graphid is a static graph,\n otherwise returns ZL_NODE_ILLEGAL."]
5313    pub fn ZL_Compressor_Graph_getHeadNode(
5314        compressor: *const ZL_Compressor,
5315        graphid: ZL_GraphID,
5316    ) -> ZL_NodeID;
5317}
5318extern "C" {
5319    #[doc = " @returns If the provided @p graphid was created by modifying another\n          existing graph, i.e., its type is `ZL_GraphType_parameterized`,\n          the `ZL_GraphID` of that other graph. Otherwise, it returns\n          `ZL_GRAPH_ILLEGAL`."]
5320    pub fn ZL_Compressor_Graph_getBaseGraphID(
5321        compressor: *const ZL_Compressor,
5322        graphid: ZL_GraphID,
5323    ) -> ZL_GraphID;
5324}
5325extern "C" {
5326    #[doc = " @returns The successor of the head node in the graph if @p graphid is a\n static graph, otherwise returns an empty list.\n @note The array is valid for the lifetime of the @p compressor."]
5327    pub fn ZL_Compressor_Graph_getSuccessors(
5328        compressor: *const ZL_Compressor,
5329        graphid: ZL_GraphID,
5330    ) -> ZL_GraphIDList;
5331}
5332extern "C" {
5333    #[doc = " @returns The custom nodes of @p graphid, which is only non-empty for\n dynamic and multi-input graphs.\n @note The array is valid for the lifetime of the @p compressor."]
5334    pub fn ZL_Compressor_Graph_getCustomNodes(
5335        compressor: *const ZL_Compressor,
5336        graphid: ZL_GraphID,
5337    ) -> ZL_NodeIDList;
5338}
5339extern "C" {
5340    #[doc = " @returns The custom graphs of @p graphid, which is only non-empty for\n selector, dynamic, and multi-input graphs.\n @note The array is valid for the lifetime of the @p compressor."]
5341    pub fn ZL_Compressor_Graph_getCustomGraphs(
5342        compressor: *const ZL_Compressor,
5343        graphid: ZL_GraphID,
5344    ) -> ZL_GraphIDList;
5345}
5346extern "C" {
5347    #[doc = " @returns The local params of @p graphid.\n @note The params for the lifetime of the @p compressor."]
5348    pub fn ZL_Compressor_Graph_getLocalParams(
5349        compressor: *const ZL_Compressor,
5350        graphid: ZL_GraphID,
5351    ) -> ZL_LocalParams;
5352}
5353extern "C" {
5354    #[doc = " @returns The number of input streams that @p node expects\n in the context of the @p cgraph."]
5355    pub fn ZL_Compressor_Node_getNumInputs(cgraph: *const ZL_Compressor, node: ZL_NodeID) -> usize;
5356}
5357extern "C" {
5358    #[doc = " @returns The input stream type that @p node expects\n @pre @p node must be valid, and must have a single input stream"]
5359    pub fn ZL_Compressor_Node_getInput0Type(
5360        cgraph: *const ZL_Compressor,
5361        node: ZL_NodeID,
5362    ) -> ZL_Type;
5363}
5364extern "C" {
5365    #[doc = " @returns The input stream type that @p node has at index @p inputIndex in\n the context of the @p cgraph\n\n @pre @p inputIndex is less than #ZL_Compressor_Node_getNumInputs(@p cgraph ,\n @p node). It is an error to pass an @p inputIndex greater or equal to the\n number of inputs. Note that all input streams within a group of variable\n inputs share the same @p inputIndex."]
5366    pub fn ZL_Compressor_Node_getInputType(
5367        cgraph: *const ZL_Compressor,
5368        nodeid: ZL_NodeID,
5369        inputIndex: ZL_IDType,
5370    ) -> ZL_Type;
5371}
5372extern "C" {
5373    #[doc = " @returns True if @p nodeid is a multi input codec whose last\n input may show up zero or more times."]
5374    pub fn ZL_Compressor_Node_isVariableInput(
5375        compressor: *const ZL_Compressor,
5376        nodeid: ZL_NodeID,
5377    ) -> bool;
5378}
5379extern "C" {
5380    #[doc = " @returns The number of output outcomes that @p node has\n in the context of the @p cgraph."]
5381    pub fn ZL_Compressor_Node_getNumOutcomes(
5382        cgraph: *const ZL_Compressor,
5383        node: ZL_NodeID,
5384    ) -> usize;
5385}
5386extern "C" {
5387    #[doc = " @returns The number of variable output that @p node has\n in the context of the @p cgraph."]
5388    pub fn ZL_Compressor_Node_getNumVariableOutcomes(
5389        cgraph: *const ZL_Compressor,
5390        node: ZL_NodeID,
5391    ) -> usize;
5392}
5393extern "C" {
5394    #[doc = " @returns The output stream type that @p node has at index @p outputIndex in\n the context of the @p cgraph\n\n @pre @p outputIndex is less than #ZS2_Compressor_Node_getNbOutputs(@p cgraph\n , @p node)"]
5395    pub fn ZL_Compressor_Node_getOutputType(
5396        cgraph: *const ZL_Compressor,
5397        node: ZL_NodeID,
5398        outputIndex: ::std::os::raw::c_int,
5399    ) -> ZL_Type;
5400}
5401extern "C" {
5402    #[doc = " @returns The local params of @p nodeid.\n @note The params for the lifetime of the @p compressor."]
5403    pub fn ZL_Compressor_Node_getLocalParams(
5404        cgraph: *const ZL_Compressor,
5405        nodeid: ZL_NodeID,
5406    ) -> ZL_LocalParams;
5407}
5408extern "C" {
5409    #[doc = " @returns the max format version that @p node supports\n in the context of the @p cgraph."]
5410    pub fn ZL_Compressor_Node_getMaxVersion(
5411        cgraph: *const ZL_Compressor,
5412        node: ZL_NodeID,
5413    ) -> ::std::os::raw::c_uint;
5414}
5415extern "C" {
5416    #[doc = " @returns the min format version that @p node supports\n in the context of the @p cgraph."]
5417    pub fn ZL_Compressor_Node_getMinVersion(
5418        cgraph: *const ZL_Compressor,
5419        node: ZL_NodeID,
5420    ) -> ::std::os::raw::c_uint;
5421}
5422extern "C" {
5423    #[doc = " @returns The transform ID for the node, which is the ID that is written into\n the frame header, and how we determine which decoder to use."]
5424    pub fn ZL_Compressor_Node_getCodecID(
5425        cgraph: *const ZL_Compressor,
5426        node: ZL_NodeID,
5427    ) -> ZL_IDType;
5428}
5429extern "C" {
5430    #[doc = " @returns If the provided @p node was created by modifying another existing\n node, the `ZL_NodeID` of that other node. Otherwise, `ZL_NODE_ILLEGAL`."]
5431    pub fn ZL_Compressor_Node_getBaseNodeID(
5432        cgraph: *const ZL_Compressor,
5433        node: ZL_NodeID,
5434    ) -> ZL_NodeID;
5435}
5436extern "C" {
5437    #[doc = " @returns The name of the node if available, else \"\", and returns NULL if @p\n node is invalid."]
5438    pub fn ZL_Compressor_Node_getName(
5439        cgraph: *const ZL_Compressor,
5440        node: ZL_NodeID,
5441    ) -> *const ::std::os::raw::c_char;
5442}
5443extern "C" {
5444    #[doc = " @returns a boolean value indicating whether the node is standard or not."]
5445    pub fn ZL_Compressor_Node_isStandard(cgraph: *const ZL_Compressor, node: ZL_NodeID) -> bool;
5446}
5447#[repr(C)]
5448#[derive(Debug, Copy, Clone)]
5449pub struct ZL_ReflectionCtx_s {
5450    _unused: [u8; 0],
5451}
5452#[doc = " Reflection API for introspecting a compressed frame.\n\n 1. Create a reflection context with ZL_ReflectionCtx_create().\n 2. Register the transforms used in the frame with\n    ZL_ReflectionCtx_registerTypedDecoder() and friends.\n 3. Set the compressed frame to process with\n    ZL_ReflectionCtx_setCompressedFrame().\n 4. Get the information you need with the various\n ZS2_ReflectionCtx_get*()\n 5. Free the context with ZL_ReflectionCtx_free().\n\n NOTE: This API is guaranteed to be safe on corrupted input.\n WARNING: Logic errors in the API usage will crash the process.\n For example trying to call any getter (e.g.\n ZL_ReflectionCtx_getNumStreams_lastChunk()) before calling\n ZL_ReflectionCtx_setCompressedFrame() and getting a successful return\n code."]
5453pub type ZL_ReflectionCtx = ZL_ReflectionCtx_s;
5454#[repr(C)]
5455#[derive(Debug, Copy, Clone)]
5456pub struct ZL_DataInfo_s {
5457    _unused: [u8; 0],
5458}
5459pub type ZL_DataInfo = ZL_DataInfo_s;
5460#[repr(C)]
5461#[derive(Debug, Copy, Clone)]
5462pub struct ZL_CodecInfo_s {
5463    _unused: [u8; 0],
5464}
5465pub type ZL_CodecInfo = ZL_CodecInfo_s;
5466extern "C" {
5467    pub fn ZL_ReflectionCtx_create() -> *mut ZL_ReflectionCtx;
5468}
5469extern "C" {
5470    pub fn ZL_ReflectionCtx_free(rctx: *mut ZL_ReflectionCtx);
5471}
5472extern "C" {
5473    #[doc = " @returns The dctx that will be used for decompression so the user\n can set parameters and register custom transforms if the helpers\n provided aren't sufficient.\n\n @pre Must be called before ZL_ReflectionCtx_setCompressedFrame()."]
5474    pub fn ZL_ReflectionCtx_getDCtx(rctx: *mut ZL_ReflectionCtx) -> *mut ZL_DCtx;
5475}
5476extern "C" {
5477    #[doc = " Registers a custom transform to be used when decoding the frame.\n @pre Must be called before ZL_ReflectionCtx_setCompressedFrame()."]
5478    pub fn ZL_ReflectionCtx_registerTypedDecoder(
5479        rctx: *mut ZL_ReflectionCtx,
5480        dtd: *const ZL_TypedDecoderDesc,
5481    );
5482}
5483extern "C" {
5484    #[doc = " Registers a custom transform to be used when decoding the frame.\n @pre Must be called before ZL_ReflectionCtx_setCompressedFrame()."]
5485    pub fn ZL_ReflectionCtx_registerVODecoder(
5486        rctx: *mut ZL_ReflectionCtx,
5487        dtd: *const ZL_VODecoderDesc,
5488    );
5489}
5490extern "C" {
5491    #[doc = " Registers a custom transform to be used when decoding the frame.\n @pre Must be called before ZL_ReflectionCtx_setCompressedFrame()."]
5492    pub fn ZL_ReflectionCtx_registerMIDecoder(
5493        rctx: *mut ZL_ReflectionCtx,
5494        dtd: *const ZL_MIDecoderDesc,
5495    );
5496}
5497extern "C" {
5498    #[doc = " Decompresses the frame in @p src and build all the information needed to\n introspect the frame.\n\n @pre Must only be called once per @p rctx.\n\n @returns ZL_returnSuccess() if decompression sueeeded."]
5499    pub fn ZL_ReflectionCtx_setCompressedFrame(
5500        rctx: *mut ZL_ReflectionCtx,
5501        src: *const ::std::os::raw::c_void,
5502        srcSize: usize,
5503    ) -> ZL_Report;
5504}
5505extern "C" {
5506    #[doc = " @returns The frame format version.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
5507    pub fn ZL_ReflectionCtx_getFrameFormatVersion(rctx: *const ZL_ReflectionCtx) -> u32;
5508}
5509extern "C" {
5510    #[doc = " @returns The size of the frame header.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
5511    pub fn ZL_ReflectionCtx_getFrameHeaderSize(rctx: *const ZL_ReflectionCtx) -> usize;
5512}
5513extern "C" {
5514    #[doc = " @returns The size of the frame footer.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
5515    pub fn ZL_ReflectionCtx_getFrameFooterSize(rctx: *const ZL_ReflectionCtx) -> usize;
5516}
5517extern "C" {
5518    #[doc = " @returns The total size of all the transform headers.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
5519    pub fn ZL_ReflectionCtx_getTotalTransformHeaderSize_lastChunk(
5520        rctx: *const ZL_ReflectionCtx,
5521    ) -> usize;
5522}
5523extern "C" {
5524    #[doc = " @returns The total number of streams in the decoder graph. This includes\n streams stored in the frame, input streams to the frame, and intermediate\n streams.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
5525    pub fn ZL_ReflectionCtx_getNumStreams_lastChunk(rctx: *const ZL_ReflectionCtx) -> usize;
5526}
5527extern "C" {
5528    #[doc = " @returns The stream at @p index\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success.\n @pre @p index is valid."]
5529    pub fn ZL_ReflectionCtx_getStream_lastChunk(
5530        rctx: *const ZL_ReflectionCtx,
5531        index: usize,
5532    ) -> *const ZL_DataInfo;
5533}
5534extern "C" {
5535    #[doc = " @returns The number of input streams to the compressed frame.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
5536    pub fn ZL_ReflectionCtx_getNumInputs(rctx: *const ZL_ReflectionCtx) -> usize;
5537}
5538extern "C" {
5539    #[doc = " @returns The input stream at @p index\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success.\n @pre @p index is valid."]
5540    pub fn ZL_ReflectionCtx_getInput(
5541        rctx: *const ZL_ReflectionCtx,
5542        index: usize,
5543    ) -> *const ZL_DataInfo;
5544}
5545extern "C" {
5546    #[doc = " @returns The number of streams stored in the compressed frame.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
5547    pub fn ZL_ReflectionCtx_getNumStoredOutputs_lastChunk(rctx: *const ZL_ReflectionCtx) -> usize;
5548}
5549extern "C" {
5550    #[doc = " @returns The stored stream at @p index\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success.\n @pre @p index is valid."]
5551    pub fn ZL_ReflectionCtx_getStoredOutput_lastChunk(
5552        rctx: *const ZL_ReflectionCtx,
5553        index: usize,
5554    ) -> *const ZL_DataInfo;
5555}
5556extern "C" {
5557    #[doc = " @returns the number of transforms that are run during the decoding process.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
5558    pub fn ZL_ReflectionCtx_getNumCodecs_lastChunk(rctx: *const ZL_ReflectionCtx) -> usize;
5559}
5560extern "C" {
5561    #[doc = " @returns The transform at @p index\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success.\n @pre @p index is valid."]
5562    pub fn ZL_ReflectionCtx_getCodec_lastChunk(
5563        rctx: *const ZL_ReflectionCtx,
5564        index: usize,
5565    ) -> *const ZL_CodecInfo;
5566}
5567extern "C" {
5568    #[doc = " @returns The type of the stream."]
5569    pub fn ZL_DataInfo_getType(si: *const ZL_DataInfo) -> ZL_Type;
5570}
5571extern "C" {
5572    #[doc = " @returns The number of elements in the stream."]
5573    pub fn ZL_DataInfo_getNumElts(si: *const ZL_DataInfo) -> usize;
5574}
5575extern "C" {
5576    #[doc = " @returns The element width of the stream."]
5577    pub fn ZL_DataInfo_getEltWidth(si: *const ZL_DataInfo) -> usize;
5578}
5579extern "C" {
5580    #[doc = " @returns The content size of the stream.\n For non-string streams equal to nbElts * eltWidth.\n For string streams equal to the sum of the lengths."]
5581    pub fn ZL_DataInfo_getContentSize(si: *const ZL_DataInfo) -> usize;
5582}
5583extern "C" {
5584    #[doc = " @returns The index for which ZL_ReflectionCtx_getStream_lastChunk() returns\n this stream."]
5585    pub fn ZL_DataInfo_getIndex(si: *const ZL_DataInfo) -> usize;
5586}
5587extern "C" {
5588    #[doc = " @returns The data pointer for the stream."]
5589    pub fn ZL_DataInfo_getDataPtr(si: *const ZL_DataInfo) -> *const ::std::os::raw::c_void;
5590}
5591extern "C" {
5592    #[doc = " @returns The length pointer for the stream if the type is\n ZL_Type_string.\n @pre The type is ZL_Type_string."]
5593    pub fn ZL_DataInfo_getLengthsPtr(si: *const ZL_DataInfo) -> *const u32;
5594}
5595extern "C" {
5596    #[doc = " @returns The transform that produced this stream or NULL\n if the stream is stored in the frame."]
5597    pub fn ZL_DataInfo_getProducerCodec(si: *const ZL_DataInfo) -> *const ZL_CodecInfo;
5598}
5599extern "C" {
5600    #[doc = " @returns The transform that consumes this stream or NULL\n if the stream is an input stream to the frame."]
5601    pub fn ZL_DataInfo_getConsumerCodec(si: *const ZL_DataInfo) -> *const ZL_CodecInfo;
5602}
5603extern "C" {
5604    #[doc = " @returns The name of the transform"]
5605    pub fn ZL_CodecInfo_getName(ti: *const ZL_CodecInfo) -> *const ::std::os::raw::c_char;
5606}
5607extern "C" {
5608    #[doc = " @returns The transform ID"]
5609    pub fn ZL_CodecInfo_getCodecID(ti: *const ZL_CodecInfo) -> ZL_IDType;
5610}
5611extern "C" {
5612    #[doc = " @returns true iff the transform is a standard transform."]
5613    pub fn ZL_CodecInfo_isStandardCodec(ti: *const ZL_CodecInfo) -> bool;
5614}
5615extern "C" {
5616    #[doc = " @returns true iff the transform is a custom transform."]
5617    pub fn ZL_CodecInfo_isCustomCodec(ti: *const ZL_CodecInfo) -> bool;
5618}
5619extern "C" {
5620    #[doc = " @returns The index for which ZL_ReflectionCtx_getCodec_lastChunk() returns\n this transform."]
5621    pub fn ZL_CodecInfo_getIndex(ti: *const ZL_CodecInfo) -> usize;
5622}
5623extern "C" {
5624    #[doc = " @returns The header pointer for the transform."]
5625    pub fn ZL_CodecInfo_getHeaderPtr(ti: *const ZL_CodecInfo) -> *const ::std::os::raw::c_void;
5626}
5627extern "C" {
5628    #[doc = " @returns The header size of the transform."]
5629    pub fn ZL_CodecInfo_getHeaderSize(ti: *const ZL_CodecInfo) -> usize;
5630}
5631extern "C" {
5632    #[doc = " @returns The number of input streams to the transform.\n Input streams are streams that are consumed by the encoder and produced by\n the decoder."]
5633    pub fn ZL_CodecInfo_getNumInputs(ti: *const ZL_CodecInfo) -> usize;
5634}
5635extern "C" {
5636    #[doc = " @returns The input stream of the transform at index @p index\n @pre index is valid"]
5637    pub fn ZL_CodecInfo_getInput(ti: *const ZL_CodecInfo, index: usize) -> *const ZL_DataInfo;
5638}
5639extern "C" {
5640    #[doc = " @returns The number of output streams to the transform.\n Output streams are streams that are produced by the encoder and consumed by\n the decoder."]
5641    pub fn ZL_CodecInfo_getNumOutputs(ti: *const ZL_CodecInfo) -> usize;
5642}
5643extern "C" {
5644    #[doc = " @returns The output stream of the transform at index @p index\n @pre index is valid"]
5645    pub fn ZL_CodecInfo_getOutput(ti: *const ZL_CodecInfo, index: usize) -> *const ZL_DataInfo;
5646}
5647extern "C" {
5648    #[doc = " @returns The number of output streams of the transform that are\n variable outputs. Necessarily no greater than\n ZL_CodecInfo_getOutput()."]
5649    pub fn ZL_CodecInfo_getNumVariableOutputs(ti: *const ZL_CodecInfo) -> usize;
5650}