openzl-sys 0.1.2+openzl.0.1.0

FFI bindings for OpenZL, a novel data compression framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
/* automatically generated by rust-bindgen 0.72.1 */

pub const ZL_ERROR_ENABLE_STATIC_ERROR_INFO: u32 = 1;
pub const ZL_ErrorCode_no_error__desc_str: &[u8; 9] = b"No Error\0";
pub const ZL_ErrorCode_GENERIC__desc_str: &[u8; 8] = b"Generic\0";
pub const ZL_ErrorCode_allocation__desc_str: &[u8; 11] = b"Allocation\0";
pub const ZL_ErrorCode_srcSize_tooSmall__desc_str: &[u8; 22] = b"Source size too small\0";
pub const ZL_ErrorCode_dstCapacity_tooSmall__desc_str: &[u8; 31] =
    b"Destination capacity too small\0";
pub const ZL_ErrorCode_userBuffer_alignmentIncorrect__desc_str: &[u8; 55] =
    b"Buffer provided is incorrectly aligned for target type\0";
pub const ZL_ErrorCode_userBuffers_invalidNum__desc_str: &[u8; 57] =
    b"Nb of Typed Buffers provided is incorrect for this frame\0";
pub const ZL_ErrorCode_decompression_incorrectAPI__desc_str: &[u8; 61] =
    b"Used an invalid decompression API method for the target Type\0";
pub const ZL_ErrorCode_header_unknown__desc_str: &[u8; 15] = b"Unknown header\0";
pub const ZL_ErrorCode_frameParameter_unsupported__desc_str: &[u8; 28] =
    b"Frame parameter unsupported\0";
pub const ZL_ErrorCode_outputID_invalid__desc_str: &[u8; 37] =
    b"Frame doesn't host this many outputs\0";
pub const ZL_ErrorCode_invalidRequest_singleOutputFrameOnly__desc_str: &[u8; 65] =
    b"This request only makes sense for Frames hosting a single Output\0";
pub const ZL_ErrorCode_outputNotCommitted__desc_str: &[u8; 21] = b"Output not committed\0";
pub const ZL_ErrorCode_outputNotReserved__desc_str: &[u8; 21] = b"Output has no buffer\0";
pub const ZL_ErrorCode_compressionParameter_invalid__desc_str: &[u8; 30] =
    b"Compression parameter invalid\0";
pub const ZL_ErrorCode_segmenter_inputNotConsumed__desc_str: &[u8; 46] =
    b"Segmenter did not consume entirely all inputs\0";
pub const ZL_ErrorCode_graph_invalid__desc_str: &[u8; 14] = b"Graph invalid\0";
pub const ZL_ErrorCode_graph_nonserializable__desc_str: &[u8; 38] =
    b"Graph incompatible with serialization\0";
pub const ZL_ErrorCode_graph_invalidNumInputs__desc_str: &[u8; 24] = b"Graph invalid nb inputs\0";
pub const ZL_ErrorCode_successor_invalid__desc_str: &[u8; 36] =
    b"Selected an invalid Successor Graph\0";
pub const ZL_ErrorCode_successor_alreadySet__desc_str: &[u8; 49] =
    b"A Successor was already assigned for this Stream\0";
pub const ZL_ErrorCode_successor_invalidNumInputs__desc_str: &[u8; 53] =
    b"Successor Graph receives an invalid number of Inputs\0";
pub const ZL_ErrorCode_inputType_unsupported__desc_str: &[u8; 42] =
    b"Input Type not supported by selected Port\0";
pub const ZL_ErrorCode_graphParameter_invalid__desc_str: &[u8; 46] =
    b"Graph was assigned an invalid Local Parameter\0";
pub const ZL_ErrorCode_nodeParameter_invalid__desc_str: &[u8; 23] = b"Node parameter invalid\0";
pub const ZL_ErrorCode_nodeParameter_invalidValue__desc_str: &[u8; 29] =
    b"Node parameter invalid value\0";
pub const ZL_ErrorCode_transform_executionFailure__desc_str: &[u8; 34] =
    b"Transform failed during execution\0";
pub const ZL_ErrorCode_customNode_definitionInvalid__desc_str: &[u8; 31] =
    b"Custom node definition invalid\0";
pub const ZL_ErrorCode_stream_wrongInit__desc_str: &[u8; 46] =
    b"Stream is not in a valid initialization stage\0";
pub const ZL_ErrorCode_streamType_incorrect__desc_str: &[u8; 35] =
    b"An incompatible type is being used\0";
pub const ZL_ErrorCode_streamCapacity_tooSmall__desc_str: &[u8; 43] =
    b"Stream internal capacity is not sufficient\0";
pub const ZL_ErrorCode_streamParameter_invalid__desc_str: &[u8; 25] = b"Stream parameter invalid\0";
pub const ZL_ErrorCode_parameter_invalid__desc_str: &[u8; 21] = b"Parameter is invalid\0";
pub const ZL_ErrorCode_formatVersion_unsupported__desc_str: &[u8; 27] =
    b"Format version unsupported\0";
pub const ZL_ErrorCode_formatVersion_notSet__desc_str: &[u8; 84] =
    b"Format version is not set; it must be set via the ZL_CParam_formatVersion parameter\0";
pub const ZL_ErrorCode_node_versionMismatch__desc_str: &[u8; 51] =
    b"Node is incompatible with requested format version\0";
pub const ZL_ErrorCode_node_unexpected_input_type__desc_str: &[u8; 31] =
    b"Unexpected input type for node\0";
pub const ZL_ErrorCode_node_invalid_input__desc_str: &[u8; 48] =
    b"Input does not respect conditions for this node\0";
pub const ZL_ErrorCode_node_invalid__desc_str: &[u8; 16] = b"Invalid Node ID\0";
pub const ZL_ErrorCode_nodeExecution_invalidOutputs__desc_str: &[u8; 69] =
    b"node execution has resulted in an incorrect configuration of outputs\0";
pub const ZL_ErrorCode_nodeRegen_countIncorrect__desc_str: &[u8; 63] =
    b"node is requested to regenerate an incorrect number of streams\0";
pub const ZL_ErrorCode_logicError__desc_str: &[u8; 21] = b"Internal logic error\0";
pub const ZL_ErrorCode_invalidTransform__desc_str: &[u8; 21] = b"Invalid transform ID\0";
pub const ZL_ErrorCode_internalBuffer_tooSmall__desc_str: &[u8; 26] =
    b"Internal buffer too small\0";
pub const ZL_ErrorCode_corruption__desc_str: &[u8; 20] = b"Corruption detected\0";
pub const ZL_ErrorCode_outputs_tooNumerous__desc_str: &[u8; 56] =
    b"Too many outputs: unsupported by claimed format version\0";
pub const ZL_ErrorCode_temporaryLibraryLimitation__desc_str: &[u8; 36] =
    b"Temporary OpenZL library limitation\0";
pub const ZL_ErrorCode_compressedChecksumWrong__desc_str: &[u8; 60] =
    b"Compressed checksum mismatch (corruption after compression)\0";
pub const ZL_ErrorCode_contentChecksumWrong__desc_str : & [u8 ; 114] = b"Content checksum mismatch (either corruption after compression or corruption during compression or decompression)\0" ;
pub const ZL_ErrorCode_srcSize_tooLarge__desc_str: &[u8; 22] = b"Source size too large\0";
pub const ZL_ErrorCode_integerOverflow__desc_str: &[u8; 17] = b"Integer overflow\0";
pub const ZL_ErrorCode_invalidName__desc_str: &[u8; 32] = b"Invalid name of graph component\0";
pub const ZL_ENABLE_RET_IF_ARG_PRINTING: u32 = 1;
pub const ZL_ENABLE_ERR_IF_ARG_PRINTING: u32 = 1;
pub const ZL_LIBRARY_VERSION_MAJOR: u32 = 0;
pub const ZL_LIBRARY_VERSION_MINOR: u32 = 1;
pub const ZL_LIBRARY_VERSION_PATCH: u32 = 0;
pub const ZL_LIBRARY_VERSION_NUMBER: u32 = 100;
pub const ZL_FBCODE_IS_RELEASE: u32 = 0;
pub const ZL_MIN_FORMAT_VERSION: u32 = 8;
pub const ZL_MAX_FORMAT_VERSION: u32 = 21;
pub const ZL_CHUNK_VERSION_MIN: u32 = 21;
pub const ZL_TYPED_INPUT_VERSION_MIN: u32 = 14;
pub const ZL_COMPRESSIONLEVEL_DEFAULT: u32 = 6;
pub const ZL_DECOMPRESSIONLEVEL_DEFAULT: u32 = 3;
pub const ZL_MINSTREAMSIZE_DEFAULT: u32 = 10;
pub const ZL_CONVERT_SERIAL_TO_STRUCT_SIZE_PID: u32 = 1;
pub const ZL_DISPATCH_PARSINGFN_PID: u32 = 519;
pub const ZL_DISPATCH_INSTRUCTIONS_PID: u32 = 520;
pub const ZL_DISPATCH_CHANNEL_ID: u32 = 83;
pub const ZL_DISPATCH_STRING_NUM_OUTPUTS_PID: u32 = 47;
pub const ZL_DISPATCH_STRING_INDICES_PID: u32 = 48;
pub const ZL_DIVIDE_BY_PID: u32 = 112;
pub const ZL_FIELD_LZ_COMPRESSION_LEVEL_OVERRIDE_PID: u32 = 181;
pub const ZL_FIELD_LZ_LITERALS_GRAPH_OVERRIDE_INDEX_PID: u32 = 0;
pub const ZL_FIELD_LZ_TOKENS_GRAPH_OVERRIDE_INDEX_PID: u32 = 1;
pub const ZL_FIELD_LZ_OFFSETS_GRAPH_OVERRIDE_INDEX_PID: u32 = 2;
pub const ZL_FIELD_LZ_EXTRA_LITERAL_LENGTHS_GRAPH_OVERRIDE_INDEX_PID: u32 = 3;
pub const ZL_FIELD_LZ_EXTRA_MATCH_LENGTHS_GRAPH_OVERRIDE_INDEX_PID: u32 = 4;
pub const ZL_SDDL_DESCRIPTION_PID: u32 = 522;
pub const ZL_SPLIT_CHANNEL_ID: u32 = 867;
pub const ZL_TOKENIZE_SORT_PID: u32 = 0;
pub const ZL_HAVE_FBCODE: u32 = 1;
pub const ZL_HAVE_X86_64_ASM: u32 = 1;
pub const ZL_ALLOW_INTROSPECTION: u32 = 1;
pub const ZL_LP_INVALID_PARAMID: i32 = -1;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_WBuffer {
    pub start: *mut ::std::os::raw::c_void,
    pub capacity: usize,
}
#[test]
fn bindgen_test_layout_ZL_WBuffer() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_WBuffer> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_WBuffer>(),
        16usize,
        "Size of ZL_WBuffer"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_WBuffer>(),
        8usize,
        "Alignment of ZL_WBuffer"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_WBuffer::start"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).capacity) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_WBuffer::capacity"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_WCursor {
    pub wb: ZL_WBuffer,
    pub pos: usize,
}
#[test]
fn bindgen_test_layout_ZL_WCursor() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_WCursor> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_WCursor>(),
        24usize,
        "Size of ZL_WCursor"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_WCursor>(),
        8usize,
        "Alignment of ZL_WCursor"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).wb) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_WCursor::wb"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_WCursor::pos"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_RBuffer {
    pub start: *const ::std::os::raw::c_void,
    pub size: usize,
}
#[test]
fn bindgen_test_layout_ZL_RBuffer() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_RBuffer> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_RBuffer>(),
        16usize,
        "Size of ZL_RBuffer"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_RBuffer>(),
        8usize,
        "Alignment of ZL_RBuffer"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_RBuffer::start"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_RBuffer::size"
    );
}
pub type ZL_IDType = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_DataID {
    pub sid: ZL_IDType,
}
#[test]
fn bindgen_test_layout_ZL_DataID() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_DataID> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_DataID>(),
        4usize,
        "Size of ZL_DataID"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_DataID>(),
        4usize,
        "Alignment of ZL_DataID"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).sid) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_DataID::sid"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_NodeID {
    pub nid: ZL_IDType,
}
#[test]
fn bindgen_test_layout_ZL_NodeID() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_NodeID> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_NodeID>(),
        4usize,
        "Size of ZL_NodeID"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_NodeID>(),
        4usize,
        "Alignment of ZL_NodeID"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nid) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_NodeID::nid"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_GraphID {
    pub gid: ZL_IDType,
}
#[test]
fn bindgen_test_layout_ZL_GraphID() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphID> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_GraphID>(),
        4usize,
        "Size of ZL_GraphID"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_GraphID>(),
        4usize,
        "Alignment of ZL_GraphID"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).gid) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_GraphID::gid"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Data_s {
    _unused: [u8; 0],
}
pub type ZL_Data = ZL_Data_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Input_s {
    _unused: [u8; 0],
}
pub type ZL_Input = ZL_Input_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Output_s {
    _unused: [u8; 0],
}
pub type ZL_Output = ZL_Output_s;
pub type ZL_TypedRef = ZL_Input;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Compressor_s {
    _unused: [u8; 0],
}
#[doc = " @defgroup Group_Compressor_LifetimeManagement Lifetime Management\n\n @{"]
pub type ZL_Compressor = ZL_Compressor_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_CompressorSerializer_s {
    _unused: [u8; 0],
}
pub type ZL_CompressorSerializer = ZL_CompressorSerializer_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_CompressorDeserializer_s {
    _unused: [u8; 0],
}
pub type ZL_CompressorDeserializer = ZL_CompressorDeserializer_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_CCtx_s {
    _unused: [u8; 0],
}
pub type ZL_CCtx = ZL_CCtx_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_DCtx_s {
    _unused: [u8; 0],
}
#[doc = " @brief Decompression context for state management (incomplete type)."]
pub type ZL_DCtx = ZL_DCtx_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Encoder_s {
    _unused: [u8; 0],
}
pub type ZL_Encoder = ZL_Encoder_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Decoder_s {
    _unused: [u8; 0],
}
pub type ZL_Decoder = ZL_Decoder_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Selector_s {
    _unused: [u8; 0],
}
pub type ZL_Selector = ZL_Selector_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Graph_s {
    _unused: [u8; 0],
}
pub type ZL_Graph = ZL_Graph_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Edge_s {
    _unused: [u8; 0],
}
pub type ZL_Edge = ZL_Edge_s;
pub const ZL_TernaryParam_auto: ZL_TernaryParam = 0;
pub const ZL_TernaryParam_enable: ZL_TernaryParam = 1;
pub const ZL_TernaryParam_disable: ZL_TernaryParam = 2;
pub type ZL_TernaryParam = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_OpaquePtr {
    #[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()"]
    pub ptr: *mut ::std::os::raw::c_void,
    #[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."]
    pub freeOpaquePtr: *mut ::std::os::raw::c_void,
    #[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."]
    pub freeFn: ::std::option::Option<
        unsafe extern "C" fn(
            freeOpaquePtr: *mut ::std::os::raw::c_void,
            ptr: *mut ::std::os::raw::c_void,
        ),
    >,
}
#[test]
fn bindgen_test_layout_ZL_OpaquePtr() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_OpaquePtr> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_OpaquePtr>(),
        24usize,
        "Size of ZL_OpaquePtr"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_OpaquePtr>(),
        8usize,
        "Alignment of ZL_OpaquePtr"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_OpaquePtr::ptr"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).freeOpaquePtr) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_OpaquePtr::freeOpaquePtr"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).freeFn) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_OpaquePtr::freeFn"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_GraphIDList {
    pub graphids: *const ZL_GraphID,
    pub nbGraphIDs: usize,
}
#[test]
fn bindgen_test_layout_ZL_GraphIDList() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphIDList> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_GraphIDList>(),
        16usize,
        "Size of ZL_GraphIDList"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_GraphIDList>(),
        8usize,
        "Alignment of ZL_GraphIDList"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).graphids) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_GraphIDList::graphids"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbGraphIDs) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_GraphIDList::nbGraphIDs"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_NodeIDList {
    pub nodeids: *const ZL_NodeID,
    pub nbNodeIDs: usize,
}
#[test]
fn bindgen_test_layout_ZL_NodeIDList() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_NodeIDList> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_NodeIDList>(),
        16usize,
        "Size of ZL_NodeIDList"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_NodeIDList>(),
        8usize,
        "Alignment of ZL_NodeIDList"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nodeids) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_NodeIDList::nodeids"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbNodeIDs) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_NodeIDList::nbNodeIDs"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_DynamicErrorInfo_s {
    _unused: [u8; 0],
}
#[doc = " Forward Declarations *"]
pub type ZL_DynamicErrorInfo = ZL_DynamicErrorInfo_s;
#[doc = " ZL_StaticErrorInfo *"]
pub type ZL_StaticErrorInfo = ZL_StaticErrorInfo_s;
#[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."]
pub type ZL_Error = ZL_Error_s;
#[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."]
pub type ZL_ErrorInfo = ZL_ErrorInfo_u;
pub const ZL_ErrorCode_no_error: ZL_ErrorCode = 0;
pub const ZL_ErrorCode_GENERIC: ZL_ErrorCode = 1;
pub const ZL_ErrorCode_srcSize_tooSmall: ZL_ErrorCode = 3;
pub const ZL_ErrorCode_srcSize_tooLarge: ZL_ErrorCode = 4;
pub const ZL_ErrorCode_dstCapacity_tooSmall: ZL_ErrorCode = 5;
pub const ZL_ErrorCode_userBuffer_alignmentIncorrect: ZL_ErrorCode = 6;
pub const ZL_ErrorCode_decompression_incorrectAPI: ZL_ErrorCode = 7;
pub const ZL_ErrorCode_userBuffers_invalidNum: ZL_ErrorCode = 8;
pub const ZL_ErrorCode_invalidName: ZL_ErrorCode = 9;
pub const ZL_ErrorCode_header_unknown: ZL_ErrorCode = 10;
pub const ZL_ErrorCode_frameParameter_unsupported: ZL_ErrorCode = 11;
pub const ZL_ErrorCode_corruption: ZL_ErrorCode = 12;
pub const ZL_ErrorCode_compressedChecksumWrong: ZL_ErrorCode = 13;
pub const ZL_ErrorCode_contentChecksumWrong: ZL_ErrorCode = 14;
pub const ZL_ErrorCode_outputs_tooNumerous: ZL_ErrorCode = 15;
pub const ZL_ErrorCode_compressionParameter_invalid: ZL_ErrorCode = 20;
pub const ZL_ErrorCode_parameter_invalid: ZL_ErrorCode = 21;
pub const ZL_ErrorCode_outputID_invalid: ZL_ErrorCode = 22;
pub const ZL_ErrorCode_invalidRequest_singleOutputFrameOnly: ZL_ErrorCode = 23;
pub const ZL_ErrorCode_outputNotCommitted: ZL_ErrorCode = 24;
pub const ZL_ErrorCode_outputNotReserved: ZL_ErrorCode = 25;
pub const ZL_ErrorCode_segmenter_inputNotConsumed: ZL_ErrorCode = 26;
pub const ZL_ErrorCode_graph_invalid: ZL_ErrorCode = 30;
pub const ZL_ErrorCode_graph_nonserializable: ZL_ErrorCode = 31;
pub const ZL_ErrorCode_invalidTransform: ZL_ErrorCode = 32;
pub const ZL_ErrorCode_graph_invalidNumInputs: ZL_ErrorCode = 33;
pub const ZL_ErrorCode_successor_invalid: ZL_ErrorCode = 40;
pub const ZL_ErrorCode_successor_alreadySet: ZL_ErrorCode = 41;
pub const ZL_ErrorCode_successor_invalidNumInputs: ZL_ErrorCode = 42;
pub const ZL_ErrorCode_inputType_unsupported: ZL_ErrorCode = 43;
pub const ZL_ErrorCode_graphParameter_invalid: ZL_ErrorCode = 44;
pub const ZL_ErrorCode_nodeParameter_invalid: ZL_ErrorCode = 50;
pub const ZL_ErrorCode_nodeParameter_invalidValue: ZL_ErrorCode = 51;
pub const ZL_ErrorCode_transform_executionFailure: ZL_ErrorCode = 52;
pub const ZL_ErrorCode_customNode_definitionInvalid: ZL_ErrorCode = 53;
pub const ZL_ErrorCode_node_unexpected_input_type: ZL_ErrorCode = 54;
pub const ZL_ErrorCode_node_invalid_input: ZL_ErrorCode = 55;
pub const ZL_ErrorCode_node_invalid: ZL_ErrorCode = 56;
pub const ZL_ErrorCode_nodeExecution_invalidOutputs: ZL_ErrorCode = 57;
pub const ZL_ErrorCode_nodeRegen_countIncorrect: ZL_ErrorCode = 58;
pub const ZL_ErrorCode_formatVersion_unsupported: ZL_ErrorCode = 60;
pub const ZL_ErrorCode_formatVersion_notSet: ZL_ErrorCode = 61;
pub const ZL_ErrorCode_node_versionMismatch: ZL_ErrorCode = 62;
pub const ZL_ErrorCode_allocation: ZL_ErrorCode = 70;
pub const ZL_ErrorCode_internalBuffer_tooSmall: ZL_ErrorCode = 71;
pub const ZL_ErrorCode_integerOverflow: ZL_ErrorCode = 72;
pub const ZL_ErrorCode_stream_wrongInit: ZL_ErrorCode = 73;
pub const ZL_ErrorCode_streamType_incorrect: ZL_ErrorCode = 74;
pub const ZL_ErrorCode_streamCapacity_tooSmall: ZL_ErrorCode = 75;
pub const ZL_ErrorCode_streamParameter_invalid: ZL_ErrorCode = 76;
pub const ZL_ErrorCode_logicError: ZL_ErrorCode = 80;
pub const ZL_ErrorCode_temporaryLibraryLimitation: ZL_ErrorCode = 81;
pub const ZL_ErrorCode_maxCode: ZL_ErrorCode = 99;
#[doc = " ZL_ErrorCode *"]
pub type ZL_ErrorCode = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_OperationContext_s {
    _unused: [u8; 0],
}
pub type ZL_OperationContext = ZL_OperationContext_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_GraphContext {
    #[doc = " The current nodeID or 0 for unset / unknown."]
    pub nodeID: ZL_NodeID,
    #[doc = " The current graphID or 0 for unset / unknown."]
    pub graphID: ZL_GraphID,
    #[doc = " The current transformID or 0 for unset / unknown."]
    pub transformID: ZL_IDType,
    #[doc = " The name of the component, may be NULL."]
    pub name: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_ZL_GraphContext() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphContext> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_GraphContext>(),
        24usize,
        "Size of ZL_GraphContext"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_GraphContext>(),
        8usize,
        "Alignment of ZL_GraphContext"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nodeID) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_GraphContext::nodeID"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).graphID) as usize - ptr as usize },
        4usize,
        "Offset of field: ZL_GraphContext::graphID"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transformID) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_GraphContext::transformID"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_GraphContext::name"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_ErrorContext {
    #[doc = " Pointer to the operation context to store dynamic error info in, or NULL\n to opt out of dynamic error info."]
    pub opCtx: *mut ZL_OperationContext,
    pub graphCtx: ZL_GraphContext,
}
#[test]
fn bindgen_test_layout_ZL_ErrorContext() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_ErrorContext> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_ErrorContext>(),
        32usize,
        "Size of ZL_ErrorContext"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_ErrorContext>(),
        8usize,
        "Alignment of ZL_ErrorContext"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).opCtx) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_ErrorContext::opCtx"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).graphCtx) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_ErrorContext::graphCtx"
    );
}
extern "C" {
    pub fn ZL_Compressor_getOperationContext(ctx: *mut ZL_Compressor) -> *mut ZL_OperationContext;
}
extern "C" {
    pub fn ZL_CCtx_getOperationContext(ctx: *mut ZL_CCtx) -> *mut ZL_OperationContext;
}
extern "C" {
    pub fn ZL_DCtx_getOperationContext(ctx: *mut ZL_DCtx) -> *mut ZL_OperationContext;
}
extern "C" {
    pub fn ZL_Encoder_getOperationContext(ctx: *mut ZL_Encoder) -> *mut ZL_OperationContext;
}
extern "C" {
    pub fn ZL_Decoder_getOperationContext(ctx: *mut ZL_Decoder) -> *mut ZL_OperationContext;
}
extern "C" {
    pub fn ZL_Graph_getOperationContext(ctx: *mut ZL_Graph) -> *mut ZL_OperationContext;
}
extern "C" {
    pub fn ZL_Edge_getOperationContext(ctx: *mut ZL_Edge) -> *mut ZL_OperationContext;
}
extern "C" {
    pub fn ZL_CompressorSerializer_getOperationContext(
        ctx: *mut ZL_CompressorSerializer,
    ) -> *mut ZL_OperationContext;
}
extern "C" {
    pub fn ZL_CompressorDeserializer_getOperationContext(
        ctx: *mut ZL_CompressorDeserializer,
    ) -> *mut ZL_OperationContext;
}
extern "C" {
    pub fn ZL_ErrorContext_getOperationContext(
        ctx: *mut ZL_ErrorContext,
    ) -> *mut ZL_OperationContext;
}
extern "C" {
    pub fn ZL_NULL_getOperationContext(
        ctx: *mut ::std::os::raw::c_void,
    ) -> *mut ZL_OperationContext;
}
extern "C" {
    pub fn ZL_OperationContext_getDefaultErrorContext(
        opCtx: *mut ZL_OperationContext,
    ) -> *mut ZL_ErrorContext;
}
#[doc = " ZL_StaticErrorInfo *"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_StaticErrorInfo_s {
    pub code: ZL_ErrorCode,
    pub fmt: *const ::std::os::raw::c_char,
    pub file: *const ::std::os::raw::c_char,
    pub func: *const ::std::os::raw::c_char,
    pub line: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_ZL_StaticErrorInfo_s() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_StaticErrorInfo_s> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_StaticErrorInfo_s>(),
        40usize,
        "Size of ZL_StaticErrorInfo_s"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_StaticErrorInfo_s>(),
        8usize,
        "Alignment of ZL_StaticErrorInfo_s"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_StaticErrorInfo_s::code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).fmt) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_StaticErrorInfo_s::fmt"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_StaticErrorInfo_s::file"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_StaticErrorInfo_s::func"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_StaticErrorInfo_s::line"
    );
}
#[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."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_ErrorInfo_u {
    pub _dy: *mut ZL_DynamicErrorInfo,
    pub _st: *const ZL_StaticErrorInfo,
}
#[test]
fn bindgen_test_layout_ZL_ErrorInfo_u() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_ErrorInfo_u> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_ErrorInfo_u>(),
        8usize,
        "Size of ZL_ErrorInfo_u"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_ErrorInfo_u>(),
        8usize,
        "Alignment of ZL_ErrorInfo_u"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._dy) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_ErrorInfo_u::_dy"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._st) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_ErrorInfo_u::_st"
    );
}
#[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."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ZL_Error_s {
    pub _code: ZL_ErrorCode,
    pub _info: ZL_ErrorInfo,
}
#[test]
fn bindgen_test_layout_ZL_Error_s() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Error_s> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Error_s>(),
        16usize,
        "Size of ZL_Error_s"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Error_s>(),
        8usize,
        "Alignment of ZL_Error_s"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Error_s::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._info) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_Error_s::_info"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_E_create(
        st: *const ZL_StaticErrorInfo,
        ctx: *const ZL_ErrorContext,
        file: *const ::std::os::raw::c_char,
        func: *const ::std::os::raw::c_char,
        line: ::std::os::raw::c_int,
        code: ZL_ErrorCode,
        fmt: *const ::std::os::raw::c_char,
        ...
    ) -> ZL_Error;
}
extern "C" {
    #[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."]
    pub fn ZL_E_appendToMessage(err: ZL_Error, fmt: *const ::std::os::raw::c_char, ...);
}
extern "C" {
    #[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."]
    pub fn ZL_E_addFrame_public(
        ctx: *const ZL_ErrorContext,
        error: ZL_Error,
        file: *const ::std::os::raw::c_char,
        func: *const ::std::os::raw::c_char,
        line: ::std::os::raw::c_int,
        fmt: *const ::std::os::raw::c_char,
        ...
    ) -> ZL_Error;
}
#[doc = " ZL_Error_Array: a const view into an array of errors, returned by some\n public APIs."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Error_Array {
    pub errors: *const ZL_Error,
    pub size: usize,
}
#[test]
fn bindgen_test_layout_ZL_Error_Array() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Error_Array> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Error_Array>(),
        16usize,
        "Size of ZL_Error_Array"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Error_Array>(),
        8usize,
        "Alignment of ZL_Error_Array"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).errors) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Error_Array::errors"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_Error_Array::size"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Result_ZL_GraphID_inner {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_GraphID,
}
#[test]
fn bindgen_test_layout_ZL_Result_ZL_GraphID_inner() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_GraphID_inner> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_ZL_GraphID_inner>(),
        8usize,
        "Size of ZL_Result_ZL_GraphID_inner"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_ZL_GraphID_inner>(),
        4usize,
        "Alignment of ZL_Result_ZL_GraphID_inner"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_GraphID_inner::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        4usize,
        "Offset of field: ZL_Result_ZL_GraphID_inner::_value"
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_Result_ZL_GraphID_u {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_Result_ZL_GraphID_inner,
    pub _error: ZL_Error,
}
#[test]
fn bindgen_test_layout_ZL_Result_ZL_GraphID_u() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_GraphID_u> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_ZL_GraphID_u>(),
        16usize,
        "Size of ZL_Result_ZL_GraphID_u"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_ZL_GraphID_u>(),
        8usize,
        "Alignment of ZL_Result_ZL_GraphID_u"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_GraphID_u::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_GraphID_u::_value"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_GraphID_u::_error"
    );
}
pub type ZL_Result_ZL_GraphID = ZL_Result_ZL_GraphID_u;
extern "C" {
    #[link_name = "ZL_Result_ZL_GraphID_extract__extern"]
    pub fn ZL_Result_ZL_GraphID_extract(
        result: ZL_Result_ZL_GraphID,
        error: *mut ZL_Error,
    ) -> ZL_GraphID;
}
pub type ZL_Result_ZL_GraphID_fake_type_needs_semicolon = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Result_ZL_NodeID_inner {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_NodeID,
}
#[test]
fn bindgen_test_layout_ZL_Result_ZL_NodeID_inner() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_NodeID_inner> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_ZL_NodeID_inner>(),
        8usize,
        "Size of ZL_Result_ZL_NodeID_inner"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_ZL_NodeID_inner>(),
        4usize,
        "Alignment of ZL_Result_ZL_NodeID_inner"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_NodeID_inner::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        4usize,
        "Offset of field: ZL_Result_ZL_NodeID_inner::_value"
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_Result_ZL_NodeID_u {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_Result_ZL_NodeID_inner,
    pub _error: ZL_Error,
}
#[test]
fn bindgen_test_layout_ZL_Result_ZL_NodeID_u() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_NodeID_u> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_ZL_NodeID_u>(),
        16usize,
        "Size of ZL_Result_ZL_NodeID_u"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_ZL_NodeID_u>(),
        8usize,
        "Alignment of ZL_Result_ZL_NodeID_u"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_NodeID_u::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_NodeID_u::_value"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_NodeID_u::_error"
    );
}
pub type ZL_Result_ZL_NodeID = ZL_Result_ZL_NodeID_u;
extern "C" {
    #[link_name = "ZL_Result_ZL_NodeID_extract__extern"]
    pub fn ZL_Result_ZL_NodeID_extract(
        result: ZL_Result_ZL_NodeID,
        error: *mut ZL_Error,
    ) -> ZL_NodeID;
}
pub type ZL_Result_ZL_NodeID_fake_type_needs_semicolon = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Result_size_t_inner {
    pub _code: ZL_ErrorCode,
    pub _value: usize,
}
#[test]
fn bindgen_test_layout_ZL_Result_size_t_inner() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_size_t_inner> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_size_t_inner>(),
        16usize,
        "Size of ZL_Result_size_t_inner"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_size_t_inner>(),
        8usize,
        "Alignment of ZL_Result_size_t_inner"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_size_t_inner::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_Result_size_t_inner::_value"
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_Result_size_t_u {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_Result_size_t_inner,
    pub _error: ZL_Error,
}
#[test]
fn bindgen_test_layout_ZL_Result_size_t_u() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_size_t_u> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_size_t_u>(),
        16usize,
        "Size of ZL_Result_size_t_u"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_size_t_u>(),
        8usize,
        "Alignment of ZL_Result_size_t_u"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_size_t_u::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_size_t_u::_value"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_size_t_u::_error"
    );
}
pub type ZL_Result_size_t = ZL_Result_size_t_u;
extern "C" {
    #[link_name = "ZL_Result_size_t_extract__extern"]
    pub fn ZL_Result_size_t_extract(result: ZL_Result_size_t, error: *mut ZL_Error) -> usize;
}
pub type ZL_Result_size_t_fake_type_needs_semicolon = ::std::os::raw::c_int;
pub type ZL_Report = ZL_Result_size_t;
extern "C" {
    #[doc = " @returns true iff the report contains an error"]
    #[link_name = "ZL_isError__extern"]
    pub fn ZL_isError(report: ZL_Report) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @pre !ZL_isError(report)\n @returns The value contained within the report"]
    #[link_name = "ZL_validResult__extern"]
    pub fn ZL_validResult(report: ZL_Report) -> usize;
}
extern "C" {
    #[doc = " @returns The error code contained within the report.\n If !ZL_isError(report), then @returns ZL_ErrorCode_no_error."]
    #[link_name = "ZL_errorCode__extern"]
    pub fn ZL_errorCode(report: ZL_Report) -> ZL_ErrorCode;
}
extern "C" {
    pub fn ZL_ErrorCode_toString(code: ZL_ErrorCode) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " @returns a successful report containing a value."]
    #[link_name = "ZL_returnValue__extern"]
    pub fn ZL_returnValue(s: usize) -> ZL_Report;
}
extern "C" {
    #[doc = " @returns a successful report without a value (set to zero)."]
    #[link_name = "ZL_returnSuccess__extern"]
    pub fn ZL_returnSuccess() -> ZL_Report;
}
extern "C" {
    #[doc = " @returns a specific ZL_ErrorCode as a ZL_Report return type."]
    pub fn ZL_returnError(err: ZL_ErrorCode) -> ZL_Report;
}
extern "C" {
    pub fn ZL_reportError(
        file: *const ::std::os::raw::c_char,
        func: *const ::std::os::raw::c_char,
        line: ::std::os::raw::c_int,
        err: ZL_ErrorCode,
        fmt: *const ::std::os::raw::c_char,
        ...
    ) -> ZL_Report;
}
pub const ZL_Type_serial: ZL_Type = 1;
pub const ZL_Type_struct: ZL_Type = 2;
pub const ZL_Type_numeric: ZL_Type = 4;
pub const ZL_Type_string: ZL_Type = 8;
#[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`)."]
pub type ZL_Type = ::std::os::raw::c_uint;
pub const ZL_DataArenaType_heap: ZL_DataArenaType = 0;
pub const ZL_DataArenaType_stack: ZL_DataArenaType = 1;
pub type ZL_DataArenaType = ::std::os::raw::c_uint;
extern "C" {
    pub fn ZL_Data_id(in_: *const ZL_Data) -> ZL_DataID;
}
extern "C" {
    pub fn ZL_Data_type(data: *const ZL_Data) -> ZL_Type;
}
extern "C" {
    #[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."]
    pub fn ZL_Data_numElts(data: *const ZL_Data) -> usize;
}
extern "C" {
    #[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."]
    pub fn ZL_Data_eltWidth(data: *const ZL_Data) -> usize;
}
extern "C" {
    #[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."]
    pub fn ZL_Data_contentSize(data: *const ZL_Data) -> usize;
}
extern "C" {
    #[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."]
    pub fn ZL_Data_rPtr(data: *const ZL_Data) -> *const ::std::os::raw::c_void;
}
extern "C" {
    pub fn ZL_Data_wPtr(data: *mut ZL_Data) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[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."]
    pub fn ZL_Data_rStringLens(data: *const ZL_Data) -> *const u32;
}
extern "C" {
    #[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()."]
    pub fn ZL_Data_wStringLens(data: *mut ZL_Data) -> *mut u32;
}
extern "C" {
    #[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."]
    pub fn ZL_Data_reserveStringLens(data: *mut ZL_Data, nbStrings: usize) -> *mut u32;
}
extern "C" {
    #[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."]
    pub fn ZL_Data_commit(data: *mut ZL_Data, nbElts: usize) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_Data_setIntMetadata(
        s: *mut ZL_Data,
        mId: ::std::os::raw::c_int,
        mvalue: ::std::os::raw::c_int,
    ) -> ZL_Report;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_IntMetadata {
    pub isPresent: ::std::os::raw::c_int,
    pub mValue: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_ZL_IntMetadata() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_IntMetadata> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_IntMetadata>(),
        8usize,
        "Size of ZL_IntMetadata"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_IntMetadata>(),
        4usize,
        "Alignment of ZL_IntMetadata"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).isPresent) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_IntMetadata::isPresent"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).mValue) as usize - ptr as usize },
        4usize,
        "Offset of field: ZL_IntMetadata::mValue"
    );
}
extern "C" {
    pub fn ZL_Data_getIntMetadata(s: *const ZL_Data, mId: ::std::os::raw::c_int) -> ZL_IntMetadata;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_IntParam {
    pub paramId: ::std::os::raw::c_int,
    pub paramValue: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_ZL_IntParam() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_IntParam> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_IntParam>(),
        8usize,
        "Size of ZL_IntParam"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_IntParam>(),
        4usize,
        "Alignment of ZL_IntParam"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).paramId) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_IntParam::paramId"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).paramValue) as usize - ptr as usize },
        4usize,
        "Offset of field: ZL_IntParam::paramValue"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_LocalIntParams {
    pub intParams: *const ZL_IntParam,
    pub nbIntParams: usize,
}
#[test]
fn bindgen_test_layout_ZL_LocalIntParams() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_LocalIntParams> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_LocalIntParams>(),
        16usize,
        "Size of ZL_LocalIntParams"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_LocalIntParams>(),
        8usize,
        "Alignment of ZL_LocalIntParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).intParams) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_LocalIntParams::intParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbIntParams) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_LocalIntParams::nbIntParams"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_CopyParam {
    pub paramId: ::std::os::raw::c_int,
    pub paramPtr: *const ::std::os::raw::c_void,
    pub paramSize: usize,
}
#[test]
fn bindgen_test_layout_ZL_CopyParam() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_CopyParam> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_CopyParam>(),
        24usize,
        "Size of ZL_CopyParam"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_CopyParam>(),
        8usize,
        "Alignment of ZL_CopyParam"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).paramId) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_CopyParam::paramId"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).paramPtr) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_CopyParam::paramPtr"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).paramSize) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_CopyParam::paramSize"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_LocalCopyParams {
    pub copyParams: *const ZL_CopyParam,
    pub nbCopyParams: usize,
}
#[test]
fn bindgen_test_layout_ZL_LocalCopyParams() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_LocalCopyParams> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_LocalCopyParams>(),
        16usize,
        "Size of ZL_LocalCopyParams"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_LocalCopyParams>(),
        8usize,
        "Alignment of ZL_LocalCopyParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).copyParams) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_LocalCopyParams::copyParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbCopyParams) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_LocalCopyParams::nbCopyParams"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_RefParam {
    pub paramId: ::std::os::raw::c_int,
    pub paramRef: *const ::std::os::raw::c_void,
    #[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."]
    pub paramSize: usize,
}
#[test]
fn bindgen_test_layout_ZL_RefParam() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_RefParam> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_RefParam>(),
        24usize,
        "Size of ZL_RefParam"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_RefParam>(),
        8usize,
        "Alignment of ZL_RefParam"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).paramId) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_RefParam::paramId"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).paramRef) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_RefParam::paramRef"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).paramSize) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_RefParam::paramSize"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_LocalRefParams {
    pub refParams: *const ZL_RefParam,
    pub nbRefParams: usize,
}
#[test]
fn bindgen_test_layout_ZL_LocalRefParams() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_LocalRefParams> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_LocalRefParams>(),
        16usize,
        "Size of ZL_LocalRefParams"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_LocalRefParams>(),
        8usize,
        "Alignment of ZL_LocalRefParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).refParams) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_LocalRefParams::refParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbRefParams) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_LocalRefParams::nbRefParams"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_LocalParams {
    pub intParams: ZL_LocalIntParams,
    pub copyParams: ZL_LocalCopyParams,
    pub refParams: ZL_LocalRefParams,
}
#[test]
fn bindgen_test_layout_ZL_LocalParams() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_LocalParams> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_LocalParams>(),
        48usize,
        "Size of ZL_LocalParams"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_LocalParams>(),
        8usize,
        "Alignment of ZL_LocalParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).intParams) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_LocalParams::intParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).copyParams) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_LocalParams::copyParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).refParams) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_LocalParams::refParams"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_CompressIntrospectionHooks_s {
    pub opaque: *mut ::std::os::raw::c_void,
    pub on_ZL_Encoder_getScratchSpace: ::std::option::Option<
        unsafe extern "C" fn(opaque: *mut ::std::os::raw::c_void, ei: *mut ZL_Encoder, size: usize),
    >,
    pub on_ZL_Encoder_sendCodecHeader: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            eictx: *mut ZL_Encoder,
            trh: *const ::std::os::raw::c_void,
            trhSize: usize,
        ),
    >,
    pub on_ZL_Encoder_createTypedStream: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            eic: *mut ZL_Encoder,
            outStreamIndex: ::std::os::raw::c_int,
            eltsCapacity: usize,
            eltWidth: usize,
            createdStream: *mut ZL_Output,
        ),
    >,
    pub on_ZL_Graph_getScratchSpace: ::std::option::Option<
        unsafe extern "C" fn(opaque: *mut ::std::os::raw::c_void, gctx: *mut ZL_Graph, size: usize),
    >,
    pub on_ZL_Edge_setMultiInputDestination_wParams: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            gctx: *mut ZL_Graph,
            inputs: *mut *mut ZL_Edge,
            nbInputs: usize,
            gid: ZL_GraphID,
            lparams: *const ZL_LocalParams,
        ),
    >,
    pub on_migraphEncode_start: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            gctx: *mut ZL_Graph,
            compressor: *const ZL_Compressor,
            gid: ZL_GraphID,
            inputs: *mut *mut ZL_Edge,
            nbInputs: usize,
        ),
    >,
    pub on_migraphEncode_end: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            arg1: *mut ZL_Graph,
            successorGraphs: *mut ZL_GraphID,
            nbSuccessors: usize,
            graphExecResult: ZL_Report,
        ),
    >,
    pub on_codecEncode_start: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            eictx: *mut ZL_Encoder,
            compressor: *const ZL_Compressor,
            nid: ZL_NodeID,
            inStreams: *mut *const ZL_Input,
            nbInStreams: usize,
        ),
    >,
    pub on_codecEncode_end: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            arg1: *mut ZL_Encoder,
            outStreams: *mut *const ZL_Output,
            nbOutputs: usize,
            codecExecResult: ZL_Report,
        ),
    >,
    pub on_cctx_convertOneInput: ::std::option::Option<
        unsafe extern "C" fn(
            opque: *mut ::std::os::raw::c_void,
            cctx: *const ZL_CCtx,
            input: *const ZL_Data,
            inType: ZL_Type,
            portTypeMask: ZL_Type,
            conversionResult: ZL_Report,
        ),
    >,
    pub on_ZL_CCtx_compressMultiTypedRef_start: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            cctx: *const ZL_CCtx,
            dst: *const ::std::os::raw::c_void,
            dstCapacity: usize,
            inputs: *const *const ZL_TypedRef,
            nbInputs: usize,
        ),
    >,
    pub on_ZL_CCtx_compressMultiTypedRef_end: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            cctx: *const ZL_CCtx,
            result: ZL_Report,
        ),
    >,
}
#[test]
fn bindgen_test_layout_ZL_CompressIntrospectionHooks_s() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_CompressIntrospectionHooks_s> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_CompressIntrospectionHooks_s>(),
        104usize,
        "Size of ZL_CompressIntrospectionHooks_s"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_CompressIntrospectionHooks_s>(),
        8usize,
        "Alignment of ZL_CompressIntrospectionHooks_s"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::opaque"
    );
    assert_eq!(
        unsafe {
            ::std::ptr::addr_of!((*ptr).on_ZL_Encoder_getScratchSpace) as usize - ptr as usize
        },
        8usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Encoder_getScratchSpace"
    );
    assert_eq!(
        unsafe {
            ::std::ptr::addr_of!((*ptr).on_ZL_Encoder_sendCodecHeader) as usize - ptr as usize
        },
        16usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Encoder_sendCodecHeader"
    );
    assert_eq!(
        unsafe {
            ::std::ptr::addr_of!((*ptr).on_ZL_Encoder_createTypedStream) as usize - ptr as usize
        },
        24usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Encoder_createTypedStream"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).on_ZL_Graph_getScratchSpace) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Graph_getScratchSpace"
    );
    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");
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).on_migraphEncode_start) as usize - ptr as usize },
        48usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::on_migraphEncode_start"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).on_migraphEncode_end) as usize - ptr as usize },
        56usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::on_migraphEncode_end"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).on_codecEncode_start) as usize - ptr as usize },
        64usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::on_codecEncode_start"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).on_codecEncode_end) as usize - ptr as usize },
        72usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::on_codecEncode_end"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).on_cctx_convertOneInput) as usize - ptr as usize },
        80usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::on_cctx_convertOneInput"
    );
    assert_eq!(
        unsafe {
            ::std::ptr::addr_of!((*ptr).on_ZL_CCtx_compressMultiTypedRef_start) as usize
                - ptr as usize
        },
        88usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_CCtx_compressMultiTypedRef_start"
    );
    assert_eq!(
        unsafe {
            ::std::ptr::addr_of!((*ptr).on_ZL_CCtx_compressMultiTypedRef_end) as usize
                - ptr as usize
        },
        96usize,
        "Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_CCtx_compressMultiTypedRef_end"
    );
}
pub type ZL_CompressIntrospectionHooks = ZL_CompressIntrospectionHooks_s;
extern "C" {
    #[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."]
    pub fn ZL_getDefaultEncodingVersion() -> ::std::os::raw::c_uint;
}
extern "C" {
    #[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."]
    pub fn ZL_getFormatVersionFromFrame(
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[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"]
    #[link_name = "ZL_compressBound__extern"]
    pub fn ZL_compressBound(totalSrcSize: usize) -> usize;
}
extern "C" {
    pub fn ZL_CCtx_create() -> *mut ZL_CCtx;
}
extern "C" {
    pub fn ZL_CCtx_free(cctx: *mut ZL_CCtx);
}
#[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."]
pub const ZL_CParam_stickyParameters: ZL_CParam = 1;
#[doc = " Scale amplitude to determine"]
pub const ZL_CParam_compressionLevel: ZL_CParam = 2;
#[doc = " Scale amplitude to determine"]
pub const ZL_CParam_decompressionLevel: ZL_CParam = 3;
#[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()."]
pub const ZL_CParam_formatVersion: ZL_CParam = 4;
#[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."]
pub const ZL_CParam_permissiveCompression: ZL_CParam = 5;
#[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."]
pub const ZL_CParam_compressedChecksum: ZL_CParam = 6;
#[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."]
pub const ZL_CParam_contentChecksum: ZL_CParam = 7;
#[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."]
pub const ZL_CParam_minStreamSize: ZL_CParam = 11;
#[doc = " The list of global compression parameters"]
pub type ZL_CParam = ::std::os::raw::c_uint;
extern "C" {
    #[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."]
    pub fn ZL_CCtx_setParameter(
        cctx: *mut ZL_CCtx,
        gcparam: ZL_CParam,
        value: ::std::os::raw::c_int,
    ) -> ZL_Report;
}
extern "C" {
    #[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)"]
    pub fn ZL_CCtx_getParameter(cctx: *const ZL_CCtx, gcparam: ZL_CParam) -> ::std::os::raw::c_int;
}
extern "C" {
    #[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."]
    pub fn ZL_CCtx_resetParameters(cctx: *mut ZL_CCtx) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_CCtx_setDataArena(cctx: *mut ZL_CCtx, sat: ZL_DataArenaType) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_CCtx_compress(
        cctx: *mut ZL_CCtx,
        dst: *mut ::std::os::raw::c_void,
        dstCapacity: usize,
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_CCtx_getErrorContextString(
        cctx: *const ZL_CCtx,
        report: ZL_Report,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " See ZL_CCtx_getErrorContextString()\n\n @param error: The error to get the context for"]
    pub fn ZL_CCtx_getErrorContextString_fromError(
        cctx: *const ZL_CCtx,
        error: ZL_Error,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[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."]
    pub fn ZL_CCtx_getWarnings(cctx: *const ZL_CCtx) -> ZL_Error_Array;
}
extern "C" {
    #[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."]
    pub fn ZL_CCtx_attachIntrospectionHooks(
        cctx: *mut ZL_CCtx,
        hooks: *const ZL_CompressIntrospectionHooks,
    ) -> ZL_Report;
}
extern "C" {
    #[doc = " Detach any introspection hooks currently attached to the CCtx."]
    pub fn ZL_CCtx_detachAllIntrospectionHooks(cctx: *mut ZL_CCtx) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_CCtx_compressTypedRef(
        cctx: *mut ZL_CCtx,
        dst: *mut ::std::os::raw::c_void,
        dstCapacity: usize,
        input: *const ZL_TypedRef,
    ) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_CCtx_compressMultiTypedRef(
        cctx: *mut ZL_CCtx,
        dst: *mut ::std::os::raw::c_void,
        dstCapacity: usize,
        inputs: *mut *const ZL_TypedRef,
        nbInputs: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[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`."]
    pub fn ZL_TypedRef_createSerial(
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
    ) -> *mut ZL_TypedRef;
}
extern "C" {
    #[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."]
    pub fn ZL_TypedRef_createStruct(
        start: *const ::std::os::raw::c_void,
        structWidth: usize,
        structCount: usize,
    ) -> *mut ZL_TypedRef;
}
extern "C" {
    #[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"]
    pub fn ZL_TypedRef_createNumeric(
        start: *const ::std::os::raw::c_void,
        numWidth: usize,
        numCount: usize,
    ) -> *mut ZL_TypedRef;
}
extern "C" {
    #[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."]
    pub fn ZL_TypedRef_createString(
        strBuffer: *const ::std::os::raw::c_void,
        bufferSize: usize,
        strLens: *const u32,
        nbStrings: usize,
    ) -> *mut ZL_TypedRef;
}
extern "C" {
    #[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"]
    pub fn ZL_TypedRef_free(tref: *mut ZL_TypedRef);
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_buildACEGraph(compressor: *mut ZL_Compressor) -> ZL_GraphID;
}
extern "C" {
    #[doc = " @see ZL_Compressor_buildACEGraph"]
    pub fn ZL_Compressor_buildACEGraph2(compressor: *mut ZL_Compressor) -> ZL_Result_ZL_GraphID;
}
extern "C" {
    #[doc = " The same as `ZL_Compressor_buildACEGraph`, but uses `defaultGraph` to\n compress until it is trained.\n\n @see ZL_Compressor_buildACEGraph"]
    pub fn ZL_Compressor_buildACEGraphWithDefault(
        compressor: *mut ZL_Compressor,
        defaultGraph: ZL_GraphID,
    ) -> ZL_GraphID;
}
extern "C" {
    #[doc = " @see ZL_Compressor_buildACEGraphWithDefault"]
    pub fn ZL_Compressor_buildACEGraphWithDefault2(
        compressor: *mut ZL_Compressor,
        defaultGraph: ZL_GraphID,
    ) -> ZL_Result_ZL_GraphID;
}
pub const ZL_StandardGraphID_illegal: ZL_StandardGraphID = 0;
pub const ZL_StandardGraphID_store: ZL_StandardGraphID = 2;
pub const ZL_StandardGraphID_fse: ZL_StandardGraphID = 3;
pub const ZL_StandardGraphID_huffman: ZL_StandardGraphID = 4;
pub const ZL_StandardGraphID_entropy: ZL_StandardGraphID = 5;
pub const ZL_StandardGraphID_constant: ZL_StandardGraphID = 6;
pub const ZL_StandardGraphID_zstd: ZL_StandardGraphID = 7;
pub const ZL_StandardGraphID_bitpack: ZL_StandardGraphID = 8;
pub const ZL_StandardGraphID_flatpack: ZL_StandardGraphID = 9;
pub const ZL_StandardGraphID_field_lz: ZL_StandardGraphID = 10;
pub const ZL_StandardGraphID_compress_generic: ZL_StandardGraphID = 11;
pub const ZL_StandardGraphID_select_generic_lz_backend: ZL_StandardGraphID = 12;
pub const ZL_StandardGraphID_select_numeric: ZL_StandardGraphID = 13;
pub const ZL_StandardGraphID_clustering: ZL_StandardGraphID = 14;
pub const ZL_StandardGraphID_try_parse_int: ZL_StandardGraphID = 15;
pub const ZL_StandardGraphID_simple_data_description_language: ZL_StandardGraphID = 16;
pub const ZL_StandardGraphID_public_end: ZL_StandardGraphID = 17;
pub type ZL_StandardGraphID = ::std::os::raw::c_uint;
pub const ZL_StandardNodeID_illegal: ZL_StandardNodeID = 0;
pub const ZL_StandardNodeID_delta_int: ZL_StandardNodeID = 2;
pub const ZL_StandardNodeID_transpose_split: ZL_StandardNodeID = 3;
pub const ZL_StandardNodeID_zigzag: ZL_StandardNodeID = 4;
pub const ZL_StandardNodeID_dispatchN_byTag: ZL_StandardNodeID = 5;
pub const ZL_StandardNodeID_float32_deconstruct: ZL_StandardNodeID = 6;
pub const ZL_StandardNodeID_bfloat16_deconstruct: ZL_StandardNodeID = 7;
pub const ZL_StandardNodeID_float16_deconstruct: ZL_StandardNodeID = 8;
pub const ZL_StandardNodeID_field_lz: ZL_StandardNodeID = 9;
pub const ZL_StandardNodeID_convert_struct_to_serial: ZL_StandardNodeID = 10;
pub const ZL_StandardNodeID_convert_num_to_struct_le: ZL_StandardNodeID = 11;
pub const ZL_StandardNodeID_convert_num_to_serial_le: ZL_StandardNodeID = 12;
pub const ZL_StandardNodeID_convert_serial_to_struct: ZL_StandardNodeID = 13;
pub const ZL_StandardNodeID_convert_serial_to_struct2: ZL_StandardNodeID = 14;
pub const ZL_StandardNodeID_convert_serial_to_struct4: ZL_StandardNodeID = 15;
pub const ZL_StandardNodeID_convert_serial_to_struct8: ZL_StandardNodeID = 16;
pub const ZL_StandardNodeID_convert_struct_to_num_le: ZL_StandardNodeID = 17;
pub const ZL_StandardNodeID_convert_struct_to_num_be: ZL_StandardNodeID = 18;
pub const ZL_StandardNodeID_convert_serial_to_num8: ZL_StandardNodeID = 19;
pub const ZL_StandardNodeID_convert_serial_to_num_le16: ZL_StandardNodeID = 20;
pub const ZL_StandardNodeID_convert_serial_to_num_le32: ZL_StandardNodeID = 21;
pub const ZL_StandardNodeID_convert_serial_to_num_le64: ZL_StandardNodeID = 22;
pub const ZL_StandardNodeID_convert_serial_to_num_be16: ZL_StandardNodeID = 23;
pub const ZL_StandardNodeID_convert_serial_to_num_be32: ZL_StandardNodeID = 24;
pub const ZL_StandardNodeID_convert_serial_to_num_be64: ZL_StandardNodeID = 25;
pub const ZL_StandardNodeID_separate_string_components: ZL_StandardNodeID = 26;
pub const ZL_StandardNodeID_bitunpack: ZL_StandardNodeID = 27;
pub const ZL_StandardNodeID_range_pack: ZL_StandardNodeID = 28;
pub const ZL_StandardNodeID_merge_sorted: ZL_StandardNodeID = 29;
pub const ZL_StandardNodeID_prefix: ZL_StandardNodeID = 30;
pub const ZL_StandardNodeID_divide_by: ZL_StandardNodeID = 31;
pub const ZL_StandardNodeID_dispatch_string: ZL_StandardNodeID = 32;
pub const ZL_StandardNodeID_concat_serial: ZL_StandardNodeID = 33;
pub const ZL_StandardNodeID_concat_num: ZL_StandardNodeID = 34;
pub const ZL_StandardNodeID_concat_struct: ZL_StandardNodeID = 35;
pub const ZL_StandardNodeID_concat_string: ZL_StandardNodeID = 36;
pub const ZL_StandardNodeID_dedup_num: ZL_StandardNodeID = 37;
pub const ZL_StandardNodeID_parse_int: ZL_StandardNodeID = 38;
pub const ZL_StandardNodeID_interleave_string: ZL_StandardNodeID = 39;
pub const ZL_StandardNodeID_tokenize_struct: ZL_StandardNodeID = 40;
pub const ZL_StandardNodeID_tokenize_numeric: ZL_StandardNodeID = 41;
pub const ZL_StandardNodeID_tokenize_string: ZL_StandardNodeID = 42;
pub const ZL_StandardNodeID_quantize_offsets: ZL_StandardNodeID = 43;
pub const ZL_StandardNodeID_quantize_lengths: ZL_StandardNodeID = 44;
pub const ZL_StandardNodeID_public_end: ZL_StandardNodeID = 45;
pub type ZL_StandardNodeID = ::std::os::raw::c_uint;
pub const ZL_Bitunpack_numBits: _bindgen_ty_1 = 1;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
extern "C" {
    pub fn ZL_Compressor_registerBitunpackNode(
        cgraph: *mut ZL_Compressor,
        nbBits: ::std::os::raw::c_int,
    ) -> ZL_NodeID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerBruteForceSelectorGraph(
        cgraph: *mut ZL_Compressor,
        successors: *const ZL_GraphID,
        numSuccessors: usize,
    ) -> ZL_GraphID;
}
extern "C" {
    #[link_name = "ZL_codemodInputAsData__extern"]
    pub fn ZL_codemodInputAsData(input: *const ZL_Input) -> *const ZL_Data;
}
extern "C" {
    #[link_name = "ZL_codemodDataAsInput__extern"]
    pub fn ZL_codemodDataAsInput(data: *const ZL_Data) -> *const ZL_Input;
}
extern "C" {
    #[link_name = "ZL_codemodMutInputAsData__extern"]
    pub fn ZL_codemodMutInputAsData(input: *mut ZL_Input) -> *mut ZL_Data;
}
extern "C" {
    #[link_name = "ZL_codemodMutDataAsInput__extern"]
    pub fn ZL_codemodMutDataAsInput(data: *mut ZL_Data) -> *mut ZL_Input;
}
extern "C" {
    #[link_name = "ZL_codemodDatasAsInputs__extern"]
    pub fn ZL_codemodDatasAsInputs(datas: *mut *const ZL_Data) -> *mut *const ZL_Input;
}
extern "C" {
    #[link_name = "ZL_codemodInputsAsDatas__extern"]
    pub fn ZL_codemodInputsAsDatas(inputs: *mut *const ZL_Input) -> *mut *const ZL_Data;
}
extern "C" {
    #[link_name = "ZL_Input_id__extern"]
    pub fn ZL_Input_id(input: *const ZL_Input) -> ZL_DataID;
}
extern "C" {
    #[link_name = "ZL_Input_type__extern"]
    pub fn ZL_Input_type(input: *const ZL_Input) -> ZL_Type;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Input_numElts__extern"]
    pub fn ZL_Input_numElts(input: *const ZL_Input) -> usize;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Input_eltWidth__extern"]
    pub fn ZL_Input_eltWidth(input: *const ZL_Input) -> usize;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Input_contentSize__extern"]
    pub fn ZL_Input_contentSize(input: *const ZL_Input) -> usize;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Input_ptr__extern"]
    pub fn ZL_Input_ptr(input: *const ZL_Input) -> *const ::std::os::raw::c_void;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Input_stringLens__extern"]
    pub fn ZL_Input_stringLens(input: *const ZL_Input) -> *const u32;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Input_getIntMetadata__extern"]
    pub fn ZL_Input_getIntMetadata(
        input: *const ZL_Input,
        key: ::std::os::raw::c_int,
    ) -> ZL_IntMetadata;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Input_setIntMetadata__extern"]
    pub fn ZL_Input_setIntMetadata(
        input: *mut ZL_Input,
        key: ::std::os::raw::c_int,
        value: ::std::os::raw::c_int,
    ) -> ZL_Report;
}
#[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"]
pub type ZL_FunctionGraphFn = ::std::option::Option<
    unsafe extern "C" fn(
        graph: *mut ZL_Graph,
        inputs: *mut *mut ZL_Edge,
        nbInputs: usize,
    ) -> ZL_Report,
>;
pub type ZL_FunctionGraphValidateFn = ::std::option::Option<
    unsafe extern "C" fn(
        compressor: *const ZL_Compressor,
        dgd: *const ZL_FunctionGraphDesc,
    ) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_FunctionGraphDesc {
    pub name: *const ::std::os::raw::c_char,
    pub graph_f: ZL_FunctionGraphFn,
    pub validate_f: ZL_FunctionGraphValidateFn,
    pub inputTypeMasks: *const ZL_Type,
    pub nbInputs: usize,
    pub lastInputIsVariable: ::std::os::raw::c_int,
    pub customGraphs: *const ZL_GraphID,
    pub nbCustomGraphs: usize,
    pub customNodes: *const ZL_NodeID,
    pub nbCustomNodes: usize,
    pub localParams: ZL_LocalParams,
    #[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."]
    pub opaque: ZL_OpaquePtr,
}
#[test]
fn bindgen_test_layout_ZL_FunctionGraphDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_FunctionGraphDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_FunctionGraphDesc>(),
        152usize,
        "Size of ZL_FunctionGraphDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_FunctionGraphDesc>(),
        8usize,
        "Alignment of ZL_FunctionGraphDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_FunctionGraphDesc::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).graph_f) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_FunctionGraphDesc::graph_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).validate_f) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_FunctionGraphDesc::validate_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).inputTypeMasks) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_FunctionGraphDesc::inputTypeMasks"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbInputs) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_FunctionGraphDesc::nbInputs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).lastInputIsVariable) as usize - ptr as usize },
        40usize,
        "Offset of field: ZL_FunctionGraphDesc::lastInputIsVariable"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).customGraphs) as usize - ptr as usize },
        48usize,
        "Offset of field: ZL_FunctionGraphDesc::customGraphs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomGraphs) as usize - ptr as usize },
        56usize,
        "Offset of field: ZL_FunctionGraphDesc::nbCustomGraphs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).customNodes) as usize - ptr as usize },
        64usize,
        "Offset of field: ZL_FunctionGraphDesc::customNodes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomNodes) as usize - ptr as usize },
        72usize,
        "Offset of field: ZL_FunctionGraphDesc::nbCustomNodes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        80usize,
        "Offset of field: ZL_FunctionGraphDesc::localParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
        128usize,
        "Offset of field: ZL_FunctionGraphDesc::opaque"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerFunctionGraph2(
        compressor: *mut ZL_Compressor,
        dgd: *const ZL_FunctionGraphDesc,
    ) -> ZL_Result_ZL_GraphID;
}
extern "C" {
    pub fn ZL_Compressor_registerFunctionGraph(
        compressor: *mut ZL_Compressor,
        dgd: *const ZL_FunctionGraphDesc,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_GraphID_isValid(graphid: ZL_GraphID) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn ZL_Graph_getCustomGraphs(gctx: *const ZL_Graph) -> ZL_GraphIDList;
}
extern "C" {
    pub fn ZL_Graph_getCustomNodes(gctx: *const ZL_Graph) -> ZL_NodeIDList;
}
extern "C" {
    pub fn ZL_Graph_getCParam(gctx: *const ZL_Graph, gparam: ZL_CParam) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn ZL_Graph_getLocalIntParam(
        gctx: *const ZL_Graph,
        intParamId: ::std::os::raw::c_int,
    ) -> ZL_IntParam;
}
extern "C" {
    pub fn ZL_Graph_getLocalRefParam(
        gctx: *const ZL_Graph,
        refParamId: ::std::os::raw::c_int,
    ) -> ZL_RefParam;
}
extern "C" {
    #[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."]
    pub fn ZL_Graph_isNodeSupported(gctx: *const ZL_Graph, nodeid: ZL_NodeID) -> bool;
}
extern "C" {
    pub fn ZL_Graph_getOpaquePtr(graph: *const ZL_Graph) -> *const ::std::os::raw::c_void;
}
extern "C" {
    pub fn ZL_Edge_getData(sctx: *const ZL_Edge) -> *const ZL_Input;
}
#[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 @{"]
pub type ZL_RuntimeGraphParameters = ZL_GraphParameters_s;
extern "C" {
    pub fn ZL_Graph_getScratchSpace(
        gctx: *mut ZL_Graph,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
#[doc = " A measurement of graph performance.\n Currently this is compressed size, but it is expected to be expanded to\n include speed."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_GraphPerformance {
    #[doc = " The compressed size of the graph on the given input(s)"]
    pub compressedSize: usize,
}
#[test]
fn bindgen_test_layout_ZL_GraphPerformance() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphPerformance> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_GraphPerformance>(),
        8usize,
        "Size of ZL_GraphPerformance"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_GraphPerformance>(),
        8usize,
        "Alignment of ZL_GraphPerformance"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).compressedSize) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_GraphPerformance::compressedSize"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Result_ZL_GraphPerformance_inner {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_GraphPerformance,
}
#[test]
fn bindgen_test_layout_ZL_Result_ZL_GraphPerformance_inner() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_GraphPerformance_inner> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_ZL_GraphPerformance_inner>(),
        16usize,
        "Size of ZL_Result_ZL_GraphPerformance_inner"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_ZL_GraphPerformance_inner>(),
        8usize,
        "Alignment of ZL_Result_ZL_GraphPerformance_inner"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_GraphPerformance_inner::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_Result_ZL_GraphPerformance_inner::_value"
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_Result_ZL_GraphPerformance_u {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_Result_ZL_GraphPerformance_inner,
    pub _error: ZL_Error,
}
#[test]
fn bindgen_test_layout_ZL_Result_ZL_GraphPerformance_u() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_GraphPerformance_u> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_ZL_GraphPerformance_u>(),
        16usize,
        "Size of ZL_Result_ZL_GraphPerformance_u"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_ZL_GraphPerformance_u>(),
        8usize,
        "Alignment of ZL_Result_ZL_GraphPerformance_u"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_GraphPerformance_u::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_GraphPerformance_u::_value"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_GraphPerformance_u::_error"
    );
}
pub type ZL_Result_ZL_GraphPerformance = ZL_Result_ZL_GraphPerformance_u;
extern "C" {
    #[link_name = "ZL_Result_ZL_GraphPerformance_extract__extern"]
    pub fn ZL_Result_ZL_GraphPerformance_extract(
        result: ZL_Result_ZL_GraphPerformance,
        error: *mut ZL_Error,
    ) -> ZL_GraphPerformance;
}
pub type ZL_Result_ZL_GraphPerformance_fake_type_needs_semicolon = ::std::os::raw::c_int;
extern "C" {
    #[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."]
    pub fn ZL_Graph_tryGraph(
        gctx: *const ZL_Graph,
        input: *const ZL_Input,
        graphID: ZL_GraphID,
        params: *const ZL_RuntimeGraphParameters,
    ) -> ZL_Result_ZL_GraphPerformance;
}
extern "C" {
    #[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."]
    pub fn ZL_Graph_tryMultiInputGraph(
        gctx: *const ZL_Graph,
        inputs: *mut *const ZL_Input,
        numInputs: usize,
        graphID: ZL_GraphID,
        params: *const ZL_RuntimeGraphParameters,
    ) -> ZL_Result_ZL_GraphPerformance;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ZL_EdgeList {
    pub field_1: ZL_EdgeList__bindgen_ty_1,
    pub field_2: ZL_EdgeList__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_EdgeList__bindgen_ty_1 {
    pub edges: *mut *mut ZL_Edge,
    pub streams: *mut *mut ZL_Edge,
}
#[test]
fn bindgen_test_layout_ZL_EdgeList__bindgen_ty_1() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_EdgeList__bindgen_ty_1> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_EdgeList__bindgen_ty_1>(),
        8usize,
        "Size of ZL_EdgeList__bindgen_ty_1"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_EdgeList__bindgen_ty_1>(),
        8usize,
        "Alignment of ZL_EdgeList__bindgen_ty_1"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).edges) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_EdgeList__bindgen_ty_1::edges"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).streams) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_EdgeList__bindgen_ty_1::streams"
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_EdgeList__bindgen_ty_2 {
    pub nbEdges: usize,
    pub nbStreams: usize,
}
#[test]
fn bindgen_test_layout_ZL_EdgeList__bindgen_ty_2() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_EdgeList__bindgen_ty_2> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_EdgeList__bindgen_ty_2>(),
        8usize,
        "Size of ZL_EdgeList__bindgen_ty_2"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_EdgeList__bindgen_ty_2>(),
        8usize,
        "Alignment of ZL_EdgeList__bindgen_ty_2"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbEdges) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_EdgeList__bindgen_ty_2::nbEdges"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbStreams) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_EdgeList__bindgen_ty_2::nbStreams"
    );
}
#[test]
fn bindgen_test_layout_ZL_EdgeList() {
    assert_eq!(
        ::std::mem::size_of::<ZL_EdgeList>(),
        16usize,
        "Size of ZL_EdgeList"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_EdgeList>(),
        8usize,
        "Alignment of ZL_EdgeList"
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ZL_Result_ZL_EdgeList_inner {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_EdgeList,
}
#[test]
fn bindgen_test_layout_ZL_Result_ZL_EdgeList_inner() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_EdgeList_inner> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_ZL_EdgeList_inner>(),
        24usize,
        "Size of ZL_Result_ZL_EdgeList_inner"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_ZL_EdgeList_inner>(),
        8usize,
        "Alignment of ZL_Result_ZL_EdgeList_inner"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_EdgeList_inner::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_Result_ZL_EdgeList_inner::_value"
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_Result_ZL_EdgeList_u {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_Result_ZL_EdgeList_inner,
    pub _error: ZL_Error,
}
#[test]
fn bindgen_test_layout_ZL_Result_ZL_EdgeList_u() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_EdgeList_u> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_ZL_EdgeList_u>(),
        24usize,
        "Size of ZL_Result_ZL_EdgeList_u"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_ZL_EdgeList_u>(),
        8usize,
        "Alignment of ZL_Result_ZL_EdgeList_u"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_EdgeList_u::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_EdgeList_u::_value"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_EdgeList_u::_error"
    );
}
pub type ZL_Result_ZL_EdgeList = ZL_Result_ZL_EdgeList_u;
extern "C" {
    #[link_name = "ZL_Result_ZL_EdgeList_extract__extern"]
    pub fn ZL_Result_ZL_EdgeList_extract(
        result: ZL_Result_ZL_EdgeList,
        error: *mut ZL_Error,
    ) -> ZL_EdgeList;
}
pub type ZL_Result_ZL_EdgeList_fake_type_needs_semicolon = ::std::os::raw::c_int;
extern "C" {
    pub fn ZL_Edge_runNode(input: *mut ZL_Edge, nid: ZL_NodeID) -> ZL_Result_ZL_EdgeList;
}
extern "C" {
    pub fn ZL_Edge_runNode_withParams(
        input: *mut ZL_Edge,
        nid: ZL_NodeID,
        localParams: *const ZL_LocalParams,
    ) -> ZL_Result_ZL_EdgeList;
}
extern "C" {
    pub fn ZL_Edge_runMultiInputNode(
        inputs: *mut *mut ZL_Edge,
        nbInputs: usize,
        nid: ZL_NodeID,
    ) -> ZL_Result_ZL_EdgeList;
}
extern "C" {
    pub fn ZL_Edge_runMultiInputNode_withParams(
        inputs: *mut *mut ZL_Edge,
        nbInputs: usize,
        nid: ZL_NodeID,
        localParams: *const ZL_LocalParams,
    ) -> ZL_Result_ZL_EdgeList;
}
extern "C" {
    #[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"]
    pub fn ZL_Edge_setIntMetadata(
        edge: *mut ZL_Edge,
        mId: ::std::os::raw::c_int,
        mValue: ::std::os::raw::c_int,
    ) -> ZL_Report;
}
extern "C" {
    pub fn ZL_Edge_setDestination(edge: *mut ZL_Edge, gid: ZL_GraphID) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_Edge_setParameterizedDestination(
        edges: *mut *mut ZL_Edge,
        nbInputs: usize,
        gid: ZL_GraphID,
        rGraphParams: *const ZL_RuntimeGraphParameters,
    ) -> ZL_Report;
}
extern "C" {
    #[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"]
    pub fn ZL_Compressor_parameterizeConvertSerialToStructNode(
        compressor: *mut ZL_Compressor,
        structSize: ::std::os::raw::c_int,
    ) -> ZL_Result_ZL_NodeID;
}
extern "C" {
    #[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"]
    pub fn ZL_Node_convertSerialToNumLE(bitWidth: usize) -> ZL_NodeID;
}
extern "C" {
    #[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"]
    pub fn ZL_Node_convertSerialToNumBE(bitWidth: usize) -> ZL_NodeID;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_SetStringLensInstructions {
    pub stringLens: *const u32,
    pub nbStrings: usize,
}
#[test]
fn bindgen_test_layout_ZL_SetStringLensInstructions() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_SetStringLensInstructions> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_SetStringLensInstructions>(),
        16usize,
        "Size of ZL_SetStringLensInstructions"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_SetStringLensInstructions>(),
        8usize,
        "Alignment of ZL_SetStringLensInstructions"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).stringLens) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_SetStringLensInstructions::stringLens"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbStrings) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_SetStringLensInstructions::nbStrings"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_SetStringLensState_s {
    _unused: [u8; 0],
}
pub type ZL_SetStringLensState = ZL_SetStringLensState_s;
pub type ZL_SetStringLensParserFn = ::std::option::Option<
    unsafe extern "C" fn(
        state: *mut ZL_SetStringLensState,
        in_: *const ZL_Input,
    ) -> ZL_SetStringLensInstructions,
>;
extern "C" {
    pub fn ZL_SetStringLensState_getOpaquePtr(
        state: *const ZL_SetStringLensState,
    ) -> *const ::std::os::raw::c_void;
}
extern "C" {
    pub fn ZL_SetStringLensState_malloc(
        state: *mut ZL_SetStringLensState,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    pub fn ZL_Compressor_registerConvertSerialToStringNode(
        cgraph: *mut ZL_Compressor,
        f: ZL_SetStringLensParserFn,
        opaque: *const ::std::os::raw::c_void,
    ) -> ZL_NodeID;
}
extern "C" {
    pub fn ZL_Edge_runConvertSerialToStringNode(
        sctx: *mut ZL_Edge,
        stringLens: *const u32,
        nbString: usize,
    ) -> ZL_Result_ZL_EdgeList;
}
pub const ZL_trlip_tokenSize: _bindgen_ty_2 = 1;
pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
extern "C" {
    #[link_name = "ZL_Node_interpretAsLE__extern"]
    pub fn ZL_Node_interpretAsLE(bitWidth: usize) -> ZL_NodeID;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_DispatchInstructions {
    pub segmentSizes: *const usize,
    pub tags: *const ::std::os::raw::c_uint,
    pub nbSegments: usize,
    pub nbTags: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_ZL_DispatchInstructions() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_DispatchInstructions> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_DispatchInstructions>(),
        32usize,
        "Size of ZL_DispatchInstructions"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_DispatchInstructions>(),
        8usize,
        "Alignment of ZL_DispatchInstructions"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).segmentSizes) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_DispatchInstructions::segmentSizes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).tags) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_DispatchInstructions::tags"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbSegments) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_DispatchInstructions::nbSegments"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbTags) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_DispatchInstructions::nbTags"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_DispatchState_s {
    _unused: [u8; 0],
}
pub type ZL_DispatchState = ZL_DispatchState_s;
extern "C" {
    pub fn ZL_DispatchState_malloc(
        state: *mut ZL_DispatchState,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[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."]
    pub fn ZL_DispatchState_getOpaquePtr(
        state: *const ZL_DispatchState,
    ) -> *const ::std::os::raw::c_void;
}
extern "C" {
    #[doc = " @returns An error from the parser function and places the @p message into\n Zstrong's error context."]
    pub fn ZL_DispatchState_returnError(
        state: *mut ZL_DispatchState,
        message: *const ::std::os::raw::c_char,
    ) -> ZL_DispatchInstructions;
}
pub type ZL_DispatchParserFn = ::std::option::Option<
    unsafe extern "C" fn(
        state: *mut ZL_DispatchState,
        in_: *const ZL_Input,
    ) -> ZL_DispatchInstructions,
>;
extern "C" {
    pub fn ZL_Compressor_registerDispatchNode(
        cgraph: *mut ZL_Compressor,
        f: ZL_DispatchParserFn,
        opaque: *const ::std::os::raw::c_void,
    ) -> ZL_NodeID;
}
extern "C" {
    #[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)"]
    pub fn ZL_Edge_runDispatchNode(
        sctx: *mut ZL_Edge,
        instructions: *const ZL_DispatchInstructions,
    ) -> ZL_Result_ZL_EdgeList;
}
extern "C" {
    #[doc = " Convenience function to get the maximum number of dispatches supported by the\n current encoder version."]
    pub fn ZL_DispatchString_maxDispatches() -> usize;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerDispatchStringNode(
        cgraph: *mut ZL_Compressor,
        nbOutputsParam: ::std::os::raw::c_int,
        dispatchIndicesParam: *const u16,
    ) -> ZL_NodeID;
}
extern "C" {
    #[doc = " Run the ZL_NODE_DISPATCH_STRING Node in the context of a Dynamic Graph,\n applying runtime defined parameters."]
    pub fn ZL_Edge_runDispatchStringNode(
        sctx: *mut ZL_Edge,
        nbOutputs: ::std::os::raw::c_int,
        indices: *const u16,
    ) -> ZL_Result_ZL_EdgeList;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerDivideByNode(
        cgraph: *mut ZL_Compressor,
        divisor: u64,
    ) -> ZL_NodeID;
}
extern "C" {
    #[doc = " DEPRECATED: Use ZL_GRAPH_FIELD_LZ instead.\n @returns ZL_GRAPH_FIELD_LZ"]
    pub fn ZL_Compressor_registerFieldLZGraph(cgraph: *mut ZL_Compressor) -> ZL_GraphID;
}
extern "C" {
    #[doc = " @returns ZL_GRAPH_FIELD_LZ with overridden compression level"]
    pub fn ZL_Compressor_registerFieldLZGraph_withLevel(
        cgraph: *mut ZL_Compressor,
        compressionLevel: ::std::os::raw::c_int,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerFieldLZGraph_withLiteralsGraph(
        cgraph: *mut ZL_Compressor,
        literalsGraph: ZL_GraphID,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerMergeSortedGraph(
        cgraph: *mut ZL_Compressor,
        bitsetGraph: ZL_GraphID,
        mergedGraph: ZL_GraphID,
        backupGraph: ZL_GraphID,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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"]
    pub fn ZL_Compressor_parameterizeTryParseIntGraph(
        compressor: *mut ZL_Compressor,
        numSuccessor: ZL_GraphID,
        exceptionSuccessor: ZL_GraphID,
    ) -> ZL_Result_ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_buildSDDLGraph(
        compressor: *mut ZL_Compressor,
        description: *const ::std::os::raw::c_void,
        descriptionSize: usize,
        successor: ZL_GraphID,
    ) -> ZL_Result_ZL_GraphID;
}
extern "C" {
    pub fn ZL_Compressor_registerSplitNode_withParams(
        cgraph: *mut ZL_Compressor,
        type_: ZL_Type,
        segmentSizes: *const usize,
        nbSegments: usize,
    ) -> ZL_NodeID;
}
extern "C" {
    #[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)"]
    pub fn ZL_Edge_runSplitNode(
        input: *mut ZL_Edge,
        segmentSizes: *const usize,
        nbSegments: usize,
    ) -> ZL_Result_ZL_EdgeList;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_SplitInstructions {
    pub segmentSizes: *const usize,
    pub nbSegments: usize,
}
#[test]
fn bindgen_test_layout_ZL_SplitInstructions() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_SplitInstructions> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_SplitInstructions>(),
        16usize,
        "Size of ZL_SplitInstructions"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_SplitInstructions>(),
        8usize,
        "Alignment of ZL_SplitInstructions"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).segmentSizes) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_SplitInstructions::segmentSizes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbSegments) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_SplitInstructions::nbSegments"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_SplitState_s {
    _unused: [u8; 0],
}
pub type ZL_SplitState = ZL_SplitState_s;
extern "C" {
    pub fn ZL_SplitState_malloc(
        state: *mut ZL_SplitState,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[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."]
    pub fn ZL_SplitState_getOpaquePtr(state: *mut ZL_SplitState) -> *const ::std::os::raw::c_void;
}
pub type ZL_SplitParserFn = ::std::option::Option<
    unsafe extern "C" fn(state: *mut ZL_SplitState, in_: *const ZL_Input) -> ZL_SplitInstructions,
>;
extern "C" {
    pub fn ZL_Compressor_registerSplitNode_withParser(
        cgraph: *mut ZL_Compressor,
        type_: ZL_Type,
        f: ZL_SplitParserFn,
        opaque: *const ::std::os::raw::c_void,
    ) -> ZL_NodeID;
}
extern "C" {
    #[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[]."]
    pub fn ZL_Compressor_registerSplitGraph(
        cgraph: *mut ZL_Compressor,
        type_: ZL_Type,
        segmentSizes: *const usize,
        successors: *const ZL_GraphID,
        nbSegments: usize,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerSplitByStructGraph(
        cgraph: *mut ZL_Compressor,
        fieldSizes: *const usize,
        successors: *const ZL_GraphID,
        nbFields: usize,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_parameterizeTokenizeNode(
        compressor: *mut ZL_Compressor,
        inputType: ZL_Type,
        sort: bool,
    ) -> ZL_Result_ZL_NodeID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_buildTokenizeGraph(
        compressor: *mut ZL_Compressor,
        inputType: ZL_Type,
        sort: bool,
        alphabetGraph: ZL_GraphID,
        indicesGraph: ZL_GraphID,
    ) -> ZL_Result_ZL_GraphID;
}
extern "C" {
    #[doc = " @see ZL_Compressor_buildTokenizeGraph\n @returns The tokenize graph, or ZL_GRAPH_ILLEGAL on error."]
    pub fn ZL_Compressor_registerTokenizeGraph(
        compressor: *mut ZL_Compressor,
        inputType: ZL_Type,
        sort: bool,
        alphabetGraph: ZL_GraphID,
        indicesGraph: ZL_GraphID,
    ) -> ZL_GraphID;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_CustomTokenizeState_s {
    _unused: [u8; 0],
}
pub type ZL_CustomTokenizeState = ZL_CustomTokenizeState_s;
extern "C" {
    #[doc = " @returns The opaque pointer passed into @fn ZS2_createGraph_customTokenize()."]
    pub fn ZL_CustomTokenizeState_getOpaquePtr(
        ctx: *const ZL_CustomTokenizeState,
    ) -> *const ::std::os::raw::c_void;
}
extern "C" {
    #[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."]
    pub fn ZL_CustomTokenizeState_createAlphabetOutput(
        ctx: *mut ZL_CustomTokenizeState,
        alphabetSize: usize,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[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."]
    pub fn ZL_CustomTokenizeState_createIndexOutput(
        ctx: *mut ZL_CustomTokenizeState,
        indexWidth: usize,
    ) -> *mut ::std::os::raw::c_void;
}
#[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."]
pub type ZL_CustomTokenizeFn = ::std::option::Option<
    unsafe extern "C" fn(ctx: *mut ZL_CustomTokenizeState, input: *const ZL_Input) -> ZL_Report,
>;
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerCustomTokenizeGraph(
        cgraph: *mut ZL_Compressor,
        streamType: ZL_Type,
        customTokenizeFn: ZL_CustomTokenizeFn,
        opaque: *const ::std::os::raw::c_void,
        alphabetGraph: ZL_GraphID,
        indicesGraph: ZL_GraphID,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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)"]
    pub fn ZL_Compressor_registerTransposeSplitGraph(
        cgraph: *mut ZL_Compressor,
        successor: ZL_GraphID,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Graph_getTransposeSplitNode(gctx: *const ZL_Graph, eltWidth: usize) -> ZL_NodeID;
}
extern "C" {
    pub fn ZL_Edge_runTransposeSplit(
        edge: *mut ZL_Edge,
        graph: *const ZL_Graph,
    ) -> ZL_Result_ZL_EdgeList;
}
extern "C" {
    #[doc = " @return zstd graph with a compression level overridden"]
    pub fn ZL_Compressor_registerZstdGraph_withLevel(
        cgraph: *mut ZL_Compressor,
        compressionLevel: ::std::os::raw::c_int,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_create() -> *mut ZL_Compressor;
}
extern "C" {
    #[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`."]
    pub fn ZL_Compressor_free(compressor: *mut ZL_Compressor);
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_getErrorContextString(
        compressor: *const ZL_Compressor,
        report: ZL_Report,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " See @ref ZL_Compressor_getErrorContextString()\n\n The same as ZL_Compressor_getErrorContextString() except works on a @ref\n ZL_Error."]
    pub fn ZL_Compressor_getErrorContextString_fromError(
        compressor: *const ZL_Compressor,
        error: ZL_Error,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_getWarnings(compressor: *const ZL_Compressor) -> ZL_Error_Array;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_setParameter(
        compresor: *mut ZL_Compressor,
        gcparam: ZL_CParam,
        value: ::std::os::raw::c_int,
    ) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_getParameter(
        compressor: *const ZL_Compressor,
        gcparam: ZL_CParam,
    ) -> ::std::os::raw::c_int;
}
#[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 @{"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_StaticGraphParameters {
    #[doc = " Optionally a name for the graph for debugging.\n If NULL, then the static graph will not have a name."]
    pub name: *const ::std::os::raw::c_char,
    #[doc = " Optionally local parameters to pass to the head node.\n If NULL, then the head node's local parameters will not be overridden."]
    pub localParams: *const ZL_LocalParams,
}
#[test]
fn bindgen_test_layout_ZL_StaticGraphParameters() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_StaticGraphParameters> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_StaticGraphParameters>(),
        16usize,
        "Size of ZL_StaticGraphParameters"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_StaticGraphParameters>(),
        8usize,
        "Alignment of ZL_StaticGraphParameters"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_StaticGraphParameters::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_StaticGraphParameters::localParams"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_buildStaticGraph(
        compressor: *mut ZL_Compressor,
        headNode: ZL_NodeID,
        successorGraphs: *const ZL_GraphID,
        numSuccessorGraphs: usize,
        params: *const ZL_StaticGraphParameters,
    ) -> ZL_Result_ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerStaticGraph_fromNode1o(
        compressor: *mut ZL_Compressor,
        headNode: ZL_NodeID,
        dstGraph: ZL_GraphID,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerStaticGraph_fromPipelineNodes1o(
        compressor: *mut ZL_Compressor,
        nodes: *const ZL_NodeID,
        nbNodes: usize,
        dstGraph: ZL_GraphID,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerStaticGraph_fromNode(
        compressor: *mut ZL_Compressor,
        headNode: ZL_NodeID,
        dstGraphs: *const ZL_GraphID,
        nbDstGraphs: usize,
    ) -> ZL_GraphID;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_StaticGraphDesc {
    pub name: *const ::std::os::raw::c_char,
    pub headNodeid: ZL_NodeID,
    pub successor_gids: *const ZL_GraphID,
    pub nbGids: usize,
    pub localParams: *const ZL_LocalParams,
}
#[test]
fn bindgen_test_layout_ZL_StaticGraphDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_StaticGraphDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_StaticGraphDesc>(),
        40usize,
        "Size of ZL_StaticGraphDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_StaticGraphDesc>(),
        8usize,
        "Alignment of ZL_StaticGraphDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_StaticGraphDesc::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).headNodeid) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_StaticGraphDesc::headNodeid"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).successor_gids) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_StaticGraphDesc::successor_gids"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbGids) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_StaticGraphDesc::nbGids"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_StaticGraphDesc::localParams"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerStaticGraph(
        compressor: *mut ZL_Compressor,
        sgDesc: *const ZL_StaticGraphDesc,
    ) -> ZL_GraphID;
}
#[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 @{"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_NodeParameters {
    #[doc = " Optionally a new name, if NULL it is derived from the node's name"]
    pub name: *const ::std::os::raw::c_char,
    #[doc = " Optionally the new local params, if NULL then the parameters are not\n updated."]
    pub localParams: *const ZL_LocalParams,
}
#[test]
fn bindgen_test_layout_ZL_NodeParameters() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_NodeParameters> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_NodeParameters>(),
        16usize,
        "Size of ZL_NodeParameters"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_NodeParameters>(),
        8usize,
        "Alignment of ZL_NodeParameters"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_NodeParameters::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_NodeParameters::localParams"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_parameterizeNode(
        compressor: *mut ZL_Compressor,
        node: ZL_NodeID,
        params: *const ZL_NodeParameters,
    ) -> ZL_Result_ZL_NodeID;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_ParameterizedNodeDesc {
    #[doc = " Optionally a new name, if NULL it is derived from the node's name"]
    pub name: *const ::std::os::raw::c_char,
    #[doc = " Node to parameterize"]
    pub node: ZL_NodeID,
    #[doc = " Optionally the new local params, if NULL then the parameters are not\n updated."]
    pub localParams: *const ZL_LocalParams,
}
#[test]
fn bindgen_test_layout_ZL_ParameterizedNodeDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_ParameterizedNodeDesc> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_ParameterizedNodeDesc>(),
        24usize,
        "Size of ZL_ParameterizedNodeDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_ParameterizedNodeDesc>(),
        8usize,
        "Alignment of ZL_ParameterizedNodeDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_ParameterizedNodeDesc::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).node) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_ParameterizedNodeDesc::node"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_ParameterizedNodeDesc::localParams"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerParameterizedNode(
        compressor: *mut ZL_Compressor,
        desc: *const ZL_ParameterizedNodeDesc,
    ) -> ZL_NodeID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_cloneNode(
        compressor: *mut ZL_Compressor,
        nodeid: ZL_NodeID,
        localParams: *const ZL_LocalParams,
    ) -> ZL_NodeID;
}
#[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 @{"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_GraphParameters_s {
    #[doc = " Optional, for debug traces, otherwise it is derived from graph's name."]
    pub name: *const ::std::os::raw::c_char,
    #[doc = " Empty means don't override"]
    pub customGraphs: *const ZL_GraphID,
    pub nbCustomGraphs: usize,
    #[doc = " Empty means don't override"]
    pub customNodes: *const ZL_NodeID,
    pub nbCustomNodes: usize,
    #[doc = " NULL means don't override"]
    pub localParams: *const ZL_LocalParams,
}
#[test]
fn bindgen_test_layout_ZL_GraphParameters_s() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphParameters_s> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_GraphParameters_s>(),
        48usize,
        "Size of ZL_GraphParameters_s"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_GraphParameters_s>(),
        8usize,
        "Alignment of ZL_GraphParameters_s"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_GraphParameters_s::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).customGraphs) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_GraphParameters_s::customGraphs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomGraphs) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_GraphParameters_s::nbCustomGraphs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).customNodes) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_GraphParameters_s::customNodes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomNodes) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_GraphParameters_s::nbCustomNodes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        40usize,
        "Offset of field: ZL_GraphParameters_s::localParams"
    );
}
#[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 @{"]
pub type ZL_GraphParameters = ZL_GraphParameters_s;
extern "C" {
    #[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."]
    pub fn ZL_Compressor_parameterizeGraph(
        compressor: *mut ZL_Compressor,
        graph: ZL_GraphID,
        params: *const ZL_GraphParameters,
    ) -> ZL_Result_ZL_GraphID;
}
#[doc = " This creates a new Graphs, based on an existing Graph,\n but modifying all or parts of its exposed parameters."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_ParameterizedGraphDesc {
    #[doc = " Optionally a new name, otherwise it is derived from `graph`'s name."]
    pub name: *const ::std::os::raw::c_char,
    pub graph: ZL_GraphID,
    #[doc = " Empty means don't override"]
    pub customGraphs: *const ZL_GraphID,
    pub nbCustomGraphs: usize,
    #[doc = " Empty means don't override"]
    pub customNodes: *const ZL_NodeID,
    pub nbCustomNodes: usize,
    #[doc = " NULL means don't override"]
    pub localParams: *const ZL_LocalParams,
}
#[test]
fn bindgen_test_layout_ZL_ParameterizedGraphDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_ParameterizedGraphDesc> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_ParameterizedGraphDesc>(),
        56usize,
        "Size of ZL_ParameterizedGraphDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_ParameterizedGraphDesc>(),
        8usize,
        "Alignment of ZL_ParameterizedGraphDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_ParameterizedGraphDesc::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).graph) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_ParameterizedGraphDesc::graph"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).customGraphs) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_ParameterizedGraphDesc::customGraphs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomGraphs) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_ParameterizedGraphDesc::nbCustomGraphs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).customNodes) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_ParameterizedGraphDesc::customNodes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomNodes) as usize - ptr as usize },
        40usize,
        "Offset of field: ZL_ParameterizedGraphDesc::nbCustomNodes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        48usize,
        "Offset of field: ZL_ParameterizedGraphDesc::localParams"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerParameterizedGraph(
        compressor: *mut ZL_Compressor,
        desc: *const ZL_ParameterizedGraphDesc,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_getNode(
        compressor: *const ZL_Compressor,
        name: *const ::std::os::raw::c_char,
    ) -> ZL_NodeID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_getGraph(
        compressor: *const ZL_Compressor,
        graph: *const ::std::os::raw::c_char,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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"]
    pub fn ZL_Compressor_selectStartingGraphID(
        compressor: *mut ZL_Compressor,
        graph: ZL_GraphID,
    ) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_validate(
        compressor: *mut ZL_Compressor,
        starting_graph: ZL_GraphID,
    ) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_CCtx_refCompressor(cctx: *mut ZL_CCtx, compressor: *const ZL_Compressor)
        -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_CCtx_selectStartingGraphID(
        cctx: *mut ZL_CCtx,
        compressor: *const ZL_Compressor,
        graphID: ZL_GraphID,
        rgp: *const ZL_GraphParameters,
    ) -> ZL_Report;
}
#[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."]
pub type ZL_GraphFn =
    ::std::option::Option<unsafe extern "C" fn(compressor: *mut ZL_Compressor) -> ZL_GraphID>;
extern "C" {
    #[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`."]
    pub fn ZL_Compressor_initUsingGraphFn(
        compressor: *mut ZL_Compressor,
        f: ZL_GraphFn,
    ) -> ZL_Report;
}
extern "C" {
    pub fn ZL_compress_usingCompressor(
        dst: *mut ::std::os::raw::c_void,
        dstCapacity: usize,
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
        compressor: *const ZL_Compressor,
    ) -> ZL_Report;
}
extern "C" {
    #[doc = " @brief compresses using @param graphFunction that both defines a custom graph\n and sets global parameters."]
    pub fn ZL_compress_usingGraphFn(
        dst: *mut ::std::os::raw::c_void,
        dstCapacity: usize,
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
        graphFunction: ZL_GraphFn,
    ) -> ZL_Report;
}
extern "C" {
    #[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`."]
    pub fn ZL_CompressorSerializer_create() -> *mut ZL_CompressorSerializer;
}
extern "C" {
    #[doc = " Frees all the resources owned by the @p serializer, including the @p\n serializer itself."]
    pub fn ZL_CompressorSerializer_free(serializer: *mut ZL_CompressorSerializer);
}
extern "C" {
    #[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."]
    pub fn ZL_CompressorSerializer_serialize(
        serializer: *mut ZL_CompressorSerializer,
        compressor: *const ZL_Compressor,
        dst: *mut *mut ::std::os::raw::c_void,
        dstSize: *mut usize,
    ) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_CompressorSerializer_serializeToJson(
        serializer: *mut ZL_CompressorSerializer,
        compressor: *const ZL_Compressor,
        dst: *mut *mut ::std::os::raw::c_void,
        dstSize: *mut usize,
    ) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_CompressorSerializer_convertToJson(
        serializer: *mut ZL_CompressorSerializer,
        dst: *mut *mut ::std::os::raw::c_void,
        dstSize: *mut usize,
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_CompressorSerializer_getErrorContextString(
        serializer: *const ZL_CompressorSerializer,
        result: ZL_Report,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[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."]
    pub fn ZL_CompressorSerializer_getErrorContextString_fromError(
        deserializer: *const ZL_CompressorSerializer,
        error: ZL_Error,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[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`."]
    pub fn ZL_CompressorDeserializer_create() -> *mut ZL_CompressorDeserializer;
}
extern "C" {
    #[doc = " Frees all the resources owned by the @p deserializer, including the @p\n deserializer itself."]
    pub fn ZL_CompressorDeserializer_free(deserializer: *mut ZL_CompressorDeserializer);
}
extern "C" {
    #[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."]
    pub fn ZL_CompressorDeserializer_deserialize(
        deserializer: *mut ZL_CompressorDeserializer,
        compressor: *mut ZL_Compressor,
        serialized: *const ::std::os::raw::c_void,
        serializedSize: usize,
    ) -> ZL_Report;
}
#[doc = " Doesn't own any memory."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_CompressorDeserializer_Dependencies {
    pub graph_names: *const *const ::std::os::raw::c_char,
    pub num_graphs: usize,
    pub node_names: *const *const ::std::os::raw::c_char,
    pub num_nodes: usize,
}
#[test]
fn bindgen_test_layout_ZL_CompressorDeserializer_Dependencies() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_CompressorDeserializer_Dependencies> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_CompressorDeserializer_Dependencies>(),
        32usize,
        "Size of ZL_CompressorDeserializer_Dependencies"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_CompressorDeserializer_Dependencies>(),
        8usize,
        "Alignment of ZL_CompressorDeserializer_Dependencies"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).graph_names) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_CompressorDeserializer_Dependencies::graph_names"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).num_graphs) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_CompressorDeserializer_Dependencies::num_graphs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).node_names) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_CompressorDeserializer_Dependencies::node_names"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).num_nodes) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_CompressorDeserializer_Dependencies::num_nodes"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Result_ZL_CompressorDeserializer_Dependencies_inner {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_CompressorDeserializer_Dependencies,
}
#[test]
fn bindgen_test_layout_ZL_Result_ZL_CompressorDeserializer_Dependencies_inner() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_CompressorDeserializer_Dependencies_inner> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_ZL_CompressorDeserializer_Dependencies_inner>(),
        40usize,
        "Size of ZL_Result_ZL_CompressorDeserializer_Dependencies_inner"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_ZL_CompressorDeserializer_Dependencies_inner>(),
        8usize,
        "Alignment of ZL_Result_ZL_CompressorDeserializer_Dependencies_inner"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_CompressorDeserializer_Dependencies_inner::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_Result_ZL_CompressorDeserializer_Dependencies_inner::_value"
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_Result_ZL_CompressorDeserializer_Dependencies_u {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_Result_ZL_CompressorDeserializer_Dependencies_inner,
    pub _error: ZL_Error,
}
#[test]
fn bindgen_test_layout_ZL_Result_ZL_CompressorDeserializer_Dependencies_u() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_Result_ZL_CompressorDeserializer_Dependencies_u> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_Result_ZL_CompressorDeserializer_Dependencies_u>(),
        40usize,
        "Size of ZL_Result_ZL_CompressorDeserializer_Dependencies_u"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_Result_ZL_CompressorDeserializer_Dependencies_u>(),
        8usize,
        "Alignment of ZL_Result_ZL_CompressorDeserializer_Dependencies_u"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._code) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_CompressorDeserializer_Dependencies_u::_code"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._value) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_CompressorDeserializer_Dependencies_u::_value"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr)._error) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_Result_ZL_CompressorDeserializer_Dependencies_u::_error"
    );
}
pub type ZL_Result_ZL_CompressorDeserializer_Dependencies =
    ZL_Result_ZL_CompressorDeserializer_Dependencies_u;
extern "C" {
    #[link_name = "ZL_Result_ZL_CompressorDeserializer_Dependencies_extract__extern"]
    pub fn ZL_Result_ZL_CompressorDeserializer_Dependencies_extract(
        result: ZL_Result_ZL_CompressorDeserializer_Dependencies,
        error: *mut ZL_Error,
    ) -> ZL_CompressorDeserializer_Dependencies;
}
pub type ZL_Result_ZL_CompressorDeserializer_Dependencies_fake_type_needs_semicolon =
    ::std::os::raw::c_int;
extern "C" {
    #[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."]
    pub fn ZL_CompressorDeserializer_getDependencies(
        deserializer: *mut ZL_CompressorDeserializer,
        compressor: *const ZL_Compressor,
        serialized: *const ::std::os::raw::c_void,
        serializedSize: usize,
    ) -> ZL_Result_ZL_CompressorDeserializer_Dependencies;
}
extern "C" {
    #[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."]
    pub fn ZL_CompressorDeserializer_getErrorContextString(
        deserializer: *const ZL_CompressorDeserializer,
        result: ZL_Report,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[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."]
    pub fn ZL_CompressorDeserializer_getErrorContextString_fromError(
        deserializer: *const ZL_CompressorDeserializer,
        error: ZL_Error,
    ) -> *const ::std::os::raw::c_char;
}
pub type ZL_PipeDstCapacityFn = ::std::option::Option<
    unsafe extern "C" fn(src: *const ::std::os::raw::c_void, srcSize: usize) -> usize,
>;
pub type ZL_PipeEncoderFn = ::std::option::Option<
    unsafe extern "C" fn(
        dst: *mut ::std::os::raw::c_void,
        dstCapacity: usize,
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
    ) -> usize,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_PipeEncoderDesc {
    pub CTid: ZL_IDType,
    pub transform_f: ZL_PipeEncoderFn,
    pub dstBound_f: ZL_PipeDstCapacityFn,
    pub name: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_ZL_PipeEncoderDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_PipeEncoderDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_PipeEncoderDesc>(),
        32usize,
        "Size of ZL_PipeEncoderDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_PipeEncoderDesc>(),
        8usize,
        "Alignment of ZL_PipeEncoderDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_PipeEncoderDesc::CTid"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_PipeEncoderDesc::transform_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).dstBound_f) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_PipeEncoderDesc::dstBound_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_PipeEncoderDesc::name"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerPipeEncoder(
        cgraph: *mut ZL_Compressor,
        ctd: *const ZL_PipeEncoderDesc,
    ) -> ZL_NodeID;
}
pub type ZL_SplitEncoderFn = ::std::option::Option<
    unsafe extern "C" fn(
        eic: *mut ZL_Encoder,
        writtenSizes: *mut usize,
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
    ) -> ZL_Report,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_SplitEncoderDesc {
    pub CTid: ZL_IDType,
    pub transform_f: ZL_SplitEncoderFn,
    pub nbOutputStreams: usize,
    pub localParams: ZL_LocalParams,
    pub name: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_ZL_SplitEncoderDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_SplitEncoderDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_SplitEncoderDesc>(),
        80usize,
        "Size of ZL_SplitEncoderDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_SplitEncoderDesc>(),
        8usize,
        "Alignment of ZL_SplitEncoderDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_SplitEncoderDesc::CTid"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_SplitEncoderDesc::transform_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbOutputStreams) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_SplitEncoderDesc::nbOutputStreams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_SplitEncoderDesc::localParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        72usize,
        "Offset of field: ZL_SplitEncoderDesc::name"
    );
}
extern "C" {
    #[doc = " Register a custom Split Transform"]
    pub fn ZL_Compressor_registerSplitEncoder(
        cgraph: *mut ZL_Compressor,
        ctd: *const ZL_SplitEncoderDesc,
    ) -> ZL_NodeID;
}
extern "C" {
    pub fn ZL_Encoder_createAllOutBuffers(
        eic: *mut ZL_Encoder,
        buffStarts: *mut *mut ::std::os::raw::c_void,
        buffCapacities: *const usize,
        nbBuffs: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[link_name = "ZL_codemodOutputAsData__extern"]
    pub fn ZL_codemodOutputAsData(output: *mut ZL_Output) -> *mut ZL_Data;
}
extern "C" {
    #[link_name = "ZL_codemodDataAsOutput__extern"]
    pub fn ZL_codemodDataAsOutput(data: *mut ZL_Data) -> *mut ZL_Output;
}
extern "C" {
    #[link_name = "ZL_codemodConstOutputAsData__extern"]
    pub fn ZL_codemodConstOutputAsData(output: *const ZL_Output) -> *const ZL_Data;
}
extern "C" {
    #[link_name = "ZL_codemodConstDataAsOutput__extern"]
    pub fn ZL_codemodConstDataAsOutput(data: *const ZL_Data) -> *const ZL_Output;
}
extern "C" {
    #[link_name = "ZL_codemodConstDatasAsOutputs__extern"]
    pub fn ZL_codemodConstDatasAsOutputs(datas: *mut *const ZL_Data) -> *mut *const ZL_Output;
}
extern "C" {
    #[link_name = "ZL_codemodOutputsAsDatas__extern"]
    pub fn ZL_codemodOutputsAsDatas(outputs: *mut *mut ZL_Output) -> *mut *mut ZL_Data;
}
extern "C" {
    #[link_name = "ZL_Output_type__extern"]
    pub fn ZL_Output_type(output: *const ZL_Output) -> ZL_Type;
}
extern "C" {
    #[link_name = "ZL_Output_id__extern"]
    pub fn ZL_Output_id(output: *const ZL_Output) -> ZL_DataID;
}
extern "C" {
    #[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."]
    pub fn ZL_Output_eltWidth(output: *const ZL_Output) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_Output_numElts(output: *const ZL_Output) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_Output_contentSize(output: *const ZL_Output) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_Output_eltsCapacity(output: *const ZL_Output) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_Output_contentCapacity(output: *const ZL_Output) -> ZL_Report;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Output_ptr__extern"]
    pub fn ZL_Output_ptr(output: *mut ZL_Output) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Output_constPtr__extern"]
    pub fn ZL_Output_constPtr(output: *const ZL_Output) -> *const ::std::os::raw::c_void;
}
extern "C" {
    #[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()."]
    #[link_name = "ZL_Output_stringLens__extern"]
    pub fn ZL_Output_stringLens(output: *mut ZL_Output) -> *mut u32;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Output_constStringLens__extern"]
    pub fn ZL_Output_constStringLens(output: *const ZL_Output) -> *const u32;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Output_reserveStringLens__extern"]
    pub fn ZL_Output_reserveStringLens(output: *mut ZL_Output, numStrings: usize) -> *mut u32;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Output_commit__extern"]
    pub fn ZL_Output_commit(output: *mut ZL_Output, numElts: usize) -> ZL_Report;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Output_setIntMetadata__extern"]
    pub fn ZL_Output_setIntMetadata(
        output: *mut ZL_Output,
        key: ::std::os::raw::c_int,
        value: ::std::os::raw::c_int,
    ) -> ZL_Report;
}
extern "C" {
    #[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."]
    #[link_name = "ZL_Output_getIntMetadata__extern"]
    pub fn ZL_Output_getIntMetadata(
        output: *const ZL_Output,
        key: ::std::os::raw::c_int,
    ) -> ZL_IntMetadata;
}
pub type ZL_SerialSelectorFn = ::std::option::Option<
    unsafe extern "C" fn(
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
        customGraphs: *const ZL_GraphID,
        nbCustomGraphs: usize,
    ) -> ZL_GraphID,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_SerialSelectorDesc {
    pub selector_f: ZL_SerialSelectorFn,
    pub customGraphs: *const ZL_GraphID,
    pub nbCustomGraphs: usize,
    pub name: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_ZL_SerialSelectorDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_SerialSelectorDesc> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_SerialSelectorDesc>(),
        32usize,
        "Size of ZL_SerialSelectorDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_SerialSelectorDesc>(),
        8usize,
        "Alignment of ZL_SerialSelectorDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).selector_f) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_SerialSelectorDesc::selector_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).customGraphs) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_SerialSelectorDesc::customGraphs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomGraphs) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_SerialSelectorDesc::nbCustomGraphs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_SerialSelectorDesc::name"
    );
}
extern "C" {
    pub fn ZL_Compressor_registerSerialSelectorGraph(
        cgraph: *mut ZL_Compressor,
        csd: *const ZL_SerialSelectorDesc,
    ) -> ZL_GraphID;
}
pub type ZL_SelectorFn = ::std::option::Option<
    unsafe extern "C" fn(
        selCtx: *const ZL_Selector,
        inputStream: *const ZL_Input,
        customGraphs: *const ZL_GraphID,
        nbCustomGraphs: usize,
    ) -> ZL_GraphID,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_SelectorDesc {
    pub selector_f: ZL_SelectorFn,
    #[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."]
    pub inStreamType: ZL_Type,
    pub customGraphs: *const ZL_GraphID,
    pub nbCustomGraphs: usize,
    pub localParams: ZL_LocalParams,
    #[doc = " Optional, the name of the graph rooted by the selector."]
    pub name: *const ::std::os::raw::c_char,
    #[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."]
    pub opaque: ZL_OpaquePtr,
}
#[test]
fn bindgen_test_layout_ZL_SelectorDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_SelectorDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_SelectorDesc>(),
        112usize,
        "Size of ZL_SelectorDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_SelectorDesc>(),
        8usize,
        "Alignment of ZL_SelectorDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).selector_f) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_SelectorDesc::selector_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).inStreamType) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_SelectorDesc::inStreamType"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).customGraphs) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_SelectorDesc::customGraphs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbCustomGraphs) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_SelectorDesc::nbCustomGraphs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_SelectorDesc::localParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        80usize,
        "Offset of field: ZL_SelectorDesc::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
        88usize,
        "Offset of field: ZL_SelectorDesc::opaque"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerSelectorGraph2(
        compressor: *mut ZL_Compressor,
        desc: *const ZL_SelectorDesc,
    ) -> ZL_Result_ZL_GraphID;
}
extern "C" {
    pub fn ZL_Compressor_registerSelectorGraph(
        cgraph: *mut ZL_Compressor,
        ctsd: *const ZL_SelectorDesc,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Selector_getInput0MaskForGraph(
        selCtx: *const ZL_Selector,
        gid: ZL_GraphID,
    ) -> ZL_Type;
}
extern "C" {
    pub fn ZL_Selector_getOpaquePtr(selector: *const ZL_Selector) -> *const ::std::os::raw::c_void;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ZL_GraphReport {
    pub finalCompressedSize: ZL_Report,
}
#[test]
fn bindgen_test_layout_ZL_GraphReport() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_GraphReport> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_GraphReport>(),
        16usize,
        "Size of ZL_GraphReport"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_GraphReport>(),
        8usize,
        "Alignment of ZL_GraphReport"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).finalCompressedSize) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_GraphReport::finalCompressedSize"
    );
}
extern "C" {
    pub fn ZL_Selector_tryGraph(
        selCtx: *const ZL_Selector,
        input: *const ZL_Input,
        graphid: ZL_GraphID,
    ) -> ZL_GraphReport;
}
extern "C" {
    pub fn ZL_Selector_setSuccessorParams(
        selCtx: *const ZL_Selector,
        lparams: *const ZL_LocalParams,
    ) -> ZL_Report;
}
extern "C" {
    pub fn ZL_Selector_getCParam(
        selCtx: *const ZL_Selector,
        gparam: ZL_CParam,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn ZL_Selector_getLocalIntParam(
        selCtx: *const ZL_Selector,
        intParamId: ::std::os::raw::c_int,
    ) -> ZL_IntParam;
}
extern "C" {
    pub fn ZL_Selector_getLocalParam(
        selCtx: *const ZL_Selector,
        paramId: ::std::os::raw::c_int,
    ) -> ZL_RefParam;
}
extern "C" {
    pub fn ZL_Selector_getLocalCopyParam(
        selCtx: *const ZL_Selector,
        copyParamId: ::std::os::raw::c_int,
    ) -> ZL_CopyParam;
}
extern "C" {
    pub fn ZL_Selector_getLocalIntParams(selCtx: *const ZL_Selector) -> ZL_LocalIntParams;
}
extern "C" {
    pub fn ZL_Selector_getScratchSpace(
        selCtx: *const ZL_Selector,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
pub type ZL_CodecStateAlloc =
    ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>;
pub type ZL_CodecStateFree =
    ::std::option::Option<unsafe extern "C" fn(state: *mut ::std::os::raw::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_CodecStateManager {
    pub stateAlloc: ZL_CodecStateAlloc,
    pub stateFree: ZL_CodecStateFree,
    pub optionalStateID: usize,
}
#[test]
fn bindgen_test_layout_ZL_CodecStateManager() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_CodecStateManager> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_CodecStateManager>(),
        24usize,
        "Size of ZL_CodecStateManager"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_CodecStateManager>(),
        8usize,
        "Alignment of ZL_CodecStateManager"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).stateAlloc) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_CodecStateManager::stateAlloc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).stateFree) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_CodecStateManager::stateFree"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).optionalStateID) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_CodecStateManager::optionalStateID"
    );
}
pub type ZL_TypedEncoderFn = ::std::option::Option<
    unsafe extern "C" fn(ectx: *mut ZL_Encoder, in_: *const ZL_Input) -> ZL_Report,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_TypedGraphDesc {
    pub CTid: ZL_IDType,
    pub inStreamType: ZL_Type,
    pub outStreamTypes: *const ZL_Type,
    pub nbOutStreams: usize,
}
#[test]
fn bindgen_test_layout_ZL_TypedGraphDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_TypedGraphDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_TypedGraphDesc>(),
        24usize,
        "Size of ZL_TypedGraphDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_TypedGraphDesc>(),
        8usize,
        "Alignment of ZL_TypedGraphDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_TypedGraphDesc::CTid"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).inStreamType) as usize - ptr as usize },
        4usize,
        "Offset of field: ZL_TypedGraphDesc::inStreamType"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).outStreamTypes) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_TypedGraphDesc::outStreamTypes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbOutStreams) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_TypedGraphDesc::nbOutStreams"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_TypedEncoderDesc {
    pub gd: ZL_TypedGraphDesc,
    pub transform_f: ZL_TypedEncoderFn,
    pub localParams: ZL_LocalParams,
    pub name: *const ::std::os::raw::c_char,
    pub trStateMgr: ZL_CodecStateManager,
    #[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."]
    pub opaque: ZL_OpaquePtr,
}
#[test]
fn bindgen_test_layout_ZL_TypedEncoderDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_TypedEncoderDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_TypedEncoderDesc>(),
        136usize,
        "Size of ZL_TypedEncoderDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_TypedEncoderDesc>(),
        8usize,
        "Alignment of ZL_TypedEncoderDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_TypedEncoderDesc::gd"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_TypedEncoderDesc::transform_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_TypedEncoderDesc::localParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        80usize,
        "Offset of field: ZL_TypedEncoderDesc::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
        88usize,
        "Offset of field: ZL_TypedEncoderDesc::trStateMgr"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
        112usize,
        "Offset of field: ZL_TypedEncoderDesc::opaque"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerTypedEncoder2(
        compressor: *mut ZL_Compressor,
        desc: *const ZL_TypedEncoderDesc,
    ) -> ZL_Result_ZL_NodeID;
}
extern "C" {
    #[doc = " Register a custom Typed Transform, to be employed in upcoming graph."]
    pub fn ZL_Compressor_registerTypedEncoder(
        cgraph: *mut ZL_Compressor,
        ctd: *const ZL_TypedEncoderDesc,
    ) -> ZL_NodeID;
}
pub type ZL_VOEncoderFn = ::std::option::Option<
    unsafe extern "C" fn(ectx: *mut ZL_Encoder, in_: *const ZL_Input) -> ZL_Report,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_VOGraphDesc {
    pub CTid: ZL_IDType,
    pub inStreamType: ZL_Type,
    pub singletonTypes: *const ZL_Type,
    pub nbSingletons: usize,
    pub voTypes: *const ZL_Type,
    pub nbVOs: usize,
}
#[test]
fn bindgen_test_layout_ZL_VOGraphDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_VOGraphDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_VOGraphDesc>(),
        40usize,
        "Size of ZL_VOGraphDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_VOGraphDesc>(),
        8usize,
        "Alignment of ZL_VOGraphDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_VOGraphDesc::CTid"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).inStreamType) as usize - ptr as usize },
        4usize,
        "Offset of field: ZL_VOGraphDesc::inStreamType"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).singletonTypes) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_VOGraphDesc::singletonTypes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbSingletons) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_VOGraphDesc::nbSingletons"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).voTypes) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_VOGraphDesc::voTypes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbVOs) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_VOGraphDesc::nbVOs"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_VOEncoderDesc {
    pub gd: ZL_VOGraphDesc,
    pub transform_f: ZL_VOEncoderFn,
    pub localParams: ZL_LocalParams,
    pub name: *const ::std::os::raw::c_char,
    pub trStateMgr: ZL_CodecStateManager,
    #[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."]
    pub opaque: ZL_OpaquePtr,
}
#[test]
fn bindgen_test_layout_ZL_VOEncoderDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_VOEncoderDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_VOEncoderDesc>(),
        152usize,
        "Size of ZL_VOEncoderDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_VOEncoderDesc>(),
        8usize,
        "Alignment of ZL_VOEncoderDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_VOEncoderDesc::gd"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
        40usize,
        "Offset of field: ZL_VOEncoderDesc::transform_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        48usize,
        "Offset of field: ZL_VOEncoderDesc::localParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        96usize,
        "Offset of field: ZL_VOEncoderDesc::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
        104usize,
        "Offset of field: ZL_VOEncoderDesc::trStateMgr"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
        128usize,
        "Offset of field: ZL_VOEncoderDesc::opaque"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerVOEncoder2(
        compressor: *mut ZL_Compressor,
        desc: *const ZL_VOEncoderDesc,
    ) -> ZL_Result_ZL_NodeID;
}
extern "C" {
    pub fn ZL_Compressor_registerVOEncoder(
        cgraph: *mut ZL_Compressor,
        ctd: *const ZL_VOEncoderDesc,
    ) -> ZL_NodeID;
}
pub type ZL_MIEncoderFn = ::std::option::Option<
    unsafe extern "C" fn(
        eictx: *mut ZL_Encoder,
        inputs: *mut *const ZL_Input,
        nbInputs: usize,
    ) -> ZL_Report,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_MIGraphDesc {
    pub CTid: ZL_IDType,
    pub inputTypes: *const ZL_Type,
    pub nbInputs: usize,
    pub lastInputIsVariable: ::std::os::raw::c_int,
    pub soTypes: *const ZL_Type,
    pub nbSOs: usize,
    pub voTypes: *const ZL_Type,
    pub nbVOs: usize,
}
#[test]
fn bindgen_test_layout_ZL_MIGraphDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_MIGraphDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_MIGraphDesc>(),
        64usize,
        "Size of ZL_MIGraphDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_MIGraphDesc>(),
        8usize,
        "Alignment of ZL_MIGraphDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_MIGraphDesc::CTid"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).inputTypes) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_MIGraphDesc::inputTypes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbInputs) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_MIGraphDesc::nbInputs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).lastInputIsVariable) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_MIGraphDesc::lastInputIsVariable"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).soTypes) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_MIGraphDesc::soTypes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbSOs) as usize - ptr as usize },
        40usize,
        "Offset of field: ZL_MIGraphDesc::nbSOs"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).voTypes) as usize - ptr as usize },
        48usize,
        "Offset of field: ZL_MIGraphDesc::voTypes"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbVOs) as usize - ptr as usize },
        56usize,
        "Offset of field: ZL_MIGraphDesc::nbVOs"
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_MIEncoderDesc {
    pub gd: ZL_MIGraphDesc,
    pub transform_f: ZL_MIEncoderFn,
    pub localParams: ZL_LocalParams,
    pub name: *const ::std::os::raw::c_char,
    pub trStateMgr: ZL_CodecStateManager,
    #[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."]
    pub opaque: ZL_OpaquePtr,
}
#[test]
fn bindgen_test_layout_ZL_MIEncoderDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_MIEncoderDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_MIEncoderDesc>(),
        176usize,
        "Size of ZL_MIEncoderDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_MIEncoderDesc>(),
        8usize,
        "Alignment of ZL_MIEncoderDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_MIEncoderDesc::gd"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
        64usize,
        "Offset of field: ZL_MIEncoderDesc::transform_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).localParams) as usize - ptr as usize },
        72usize,
        "Offset of field: ZL_MIEncoderDesc::localParams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        120usize,
        "Offset of field: ZL_MIEncoderDesc::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
        128usize,
        "Offset of field: ZL_MIEncoderDesc::trStateMgr"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
        152usize,
        "Offset of field: ZL_MIEncoderDesc::opaque"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_registerMIEncoder2(
        compressor: *mut ZL_Compressor,
        desc: *const ZL_MIEncoderDesc,
    ) -> ZL_Result_ZL_NodeID;
}
extern "C" {
    pub fn ZL_Compressor_registerMIEncoder(
        cgraph: *mut ZL_Compressor,
        ctd: *const ZL_MIEncoderDesc,
    ) -> ZL_NodeID;
}
extern "C" {
    #[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."]
    pub fn ZL_NodeID_isValid(nodeid: ZL_NodeID) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn ZL_Encoder_getCParam(eic: *const ZL_Encoder, gparam: ZL_CParam)
        -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn ZL_Encoder_getLocalIntParam(
        eic: *const ZL_Encoder,
        intParamId: ::std::os::raw::c_int,
    ) -> ZL_IntParam;
}
extern "C" {
    pub fn ZL_Encoder_getLocalParam(
        eic: *const ZL_Encoder,
        paramId: ::std::os::raw::c_int,
    ) -> ZL_RefParam;
}
extern "C" {
    pub fn ZL_Encoder_getLocalCopyParam(
        eic: *const ZL_Encoder,
        copyParamId: ::std::os::raw::c_int,
    ) -> ZL_CopyParam;
}
extern "C" {
    pub fn ZL_Encoder_getLocalIntParams(eic: *const ZL_Encoder) -> ZL_LocalIntParams;
}
extern "C" {
    pub fn ZL_Encoder_getLocalParams(eic: *const ZL_Encoder) -> *const ZL_LocalParams;
}
extern "C" {
    pub fn ZL_Encoder_getScratchSpace(
        eic: *mut ZL_Encoder,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    pub fn ZL_Encoder_createTypedStream(
        eic: *mut ZL_Encoder,
        outcomeIndex: ::std::os::raw::c_int,
        eltsCapacity: usize,
        eltWidth: usize,
    ) -> *mut ZL_Output;
}
extern "C" {
    pub fn ZL_Encoder_createStringStream(
        eic: *mut ZL_Encoder,
        outcomeIndex: ::std::os::raw::c_int,
        nbStringsMax: usize,
        sumStringLensMax: usize,
    ) -> *mut ZL_Output;
}
extern "C" {
    pub fn ZL_Encoder_sendCodecHeader(
        ei: *mut ZL_Encoder,
        trh: *const ::std::os::raw::c_void,
        trhSize: usize,
    );
}
extern "C" {
    #[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)."]
    pub fn ZL_Encoder_getState(ei: *mut ZL_Encoder) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[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!"]
    pub fn ZL_Encoder_getOpaquePtr(eictx: *const ZL_Encoder) -> *const ::std::os::raw::c_void;
}
extern "C" {
    #[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"]
    pub fn ZL_decompress(
        dst: *mut ::std::os::raw::c_void,
        dstCapacity: usize,
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[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"]
    pub fn ZL_getDecompressedSize(
        compressed: *const ::std::os::raw::c_void,
        cSize: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[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"]
    pub fn ZL_getCompressedSize(
        compressed: *const ::std::os::raw::c_void,
        testedSize: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[doc = " @brief Creates a new decompression context.\n\n @return Pointer to new context, or NULL on error"]
    pub fn ZL_DCtx_create() -> *mut ZL_DCtx;
}
extern "C" {
    #[doc = " @brief Frees a decompression context.\n\n @param dctx Decompression context to free"]
    pub fn ZL_DCtx_free(dctx: *mut ZL_DCtx);
}
#[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."]
pub const ZL_DParam_stickyParameters: ZL_DParam = 1;
#[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"]
pub const ZL_DParam_checkCompressedChecksum: ZL_DParam = 2;
#[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"]
pub const ZL_DParam_checkContentChecksum: ZL_DParam = 3;
#[doc = " @brief Global decompression parameters."]
pub type ZL_DParam = ::std::os::raw::c_uint;
extern "C" {
    #[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"]
    pub fn ZL_DCtx_setParameter(
        dctx: *mut ZL_DCtx,
        gdparam: ZL_DParam,
        value: ::std::os::raw::c_int,
    ) -> ZL_Report;
}
extern "C" {
    #[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"]
    pub fn ZL_DCtx_getParameter(dctx: *const ZL_DCtx, gdparam: ZL_DParam) -> ::std::os::raw::c_int;
}
extern "C" {
    #[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"]
    pub fn ZL_DCtx_resetParameters(dctx: *mut ZL_DCtx) -> ZL_Report;
}
extern "C" {
    pub fn ZL_DCtx_setStreamArena(dctx: *mut ZL_DCtx, sat: ZL_DataArenaType) -> ZL_Report;
}
extern "C" {
    #[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"]
    pub fn ZL_DCtx_getErrorContextString(
        dctx: *const ZL_DCtx,
        report: ZL_Report,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[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"]
    pub fn ZL_DCtx_getErrorContextString_fromError(
        dctx: *const ZL_DCtx,
        error: ZL_Error,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[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"]
    pub fn ZL_DCtx_getWarnings(dctx: *const ZL_DCtx) -> ZL_Error_Array;
}
extern "C" {
    #[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"]
    pub fn ZL_DCtx_decompress(
        dctx: *mut ZL_DCtx,
        dst: *mut ::std::os::raw::c_void,
        dstCapacity: usize,
        compressed: *const ::std::os::raw::c_void,
        cSize: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[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.)"]
    pub fn ZL_getNumOutputs(compressed: *const ::std::os::raw::c_void, cSize: usize) -> ZL_Report;
}
extern "C" {
    #[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"]
    pub fn ZL_getOutputType(
        stPtr: *mut ZL_Type,
        compressed: *const ::std::os::raw::c_void,
        cSize: usize,
    ) -> ZL_Report;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_FrameInfo {
    _unused: [u8; 0],
}
extern "C" {
    #[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"]
    pub fn ZL_FrameInfo_create(
        compressed: *const ::std::os::raw::c_void,
        cSize: usize,
    ) -> *mut ZL_FrameInfo;
}
extern "C" {
    #[doc = " @brief Frees a frame information object.\n\n @param fi Frame information object to free"]
    pub fn ZL_FrameInfo_free(fi: *mut ZL_FrameInfo);
}
extern "C" {
    #[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"]
    pub fn ZL_FrameInfo_getFormatVersion(fi: *const ZL_FrameInfo) -> ZL_Report;
}
extern "C" {
    #[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"]
    pub fn ZL_FrameInfo_getNumOutputs(fi: *const ZL_FrameInfo) -> ZL_Report;
}
extern "C" {
    #[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"]
    pub fn ZL_FrameInfo_getOutputType(
        fi: *const ZL_FrameInfo,
        outputID: ::std::os::raw::c_int,
    ) -> ZL_Report;
}
extern "C" {
    #[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"]
    pub fn ZL_FrameInfo_getDecompressedSize(
        fi: *const ZL_FrameInfo,
        outputID: ::std::os::raw::c_int,
    ) -> ZL_Report;
}
extern "C" {
    #[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"]
    pub fn ZL_FrameInfo_getNumElts(
        fi: *const ZL_FrameInfo,
        outputID: ::std::os::raw::c_int,
    ) -> ZL_Report;
}
#[doc = " @brief Information about a decompressed typed output."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_OutputInfo {
    #[doc = "< Type of the output"]
    pub type_: ZL_Type,
    #[doc = "< width of elements in bytes"]
    pub fixedWidth: u32,
    #[doc = "< Decompressed size in bytes"]
    pub decompressedByteSize: u64,
    #[doc = "< Number of elements"]
    pub numElts: u64,
}
#[test]
fn bindgen_test_layout_ZL_OutputInfo() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_OutputInfo> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_OutputInfo>(),
        24usize,
        "Size of ZL_OutputInfo"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_OutputInfo>(),
        8usize,
        "Alignment of ZL_OutputInfo"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_OutputInfo::type_"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).fixedWidth) as usize - ptr as usize },
        4usize,
        "Offset of field: ZL_OutputInfo::fixedWidth"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).decompressedByteSize) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_OutputInfo::decompressedByteSize"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).numElts) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_OutputInfo::numElts"
    );
}
extern "C" {
    #[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"]
    pub fn ZL_DCtx_decompressTyped(
        dctx: *mut ZL_DCtx,
        outputInfo: *mut ZL_OutputInfo,
        dst: *mut ::std::os::raw::c_void,
        dstByteCapacity: usize,
        compressed: *const ::std::os::raw::c_void,
        cSize: usize,
    ) -> ZL_Report;
}
#[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."]
pub type ZL_TypedBuffer = ZL_Output;
extern "C" {
    #[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"]
    pub fn ZL_TypedBuffer_create() -> *mut ZL_TypedBuffer;
}
extern "C" {
    #[doc = " @brief Frees a typed buffer object.\n\n @param tbuffer Typed buffer to free"]
    pub fn ZL_TypedBuffer_free(tbuffer: *mut ZL_TypedBuffer);
}
extern "C" {
    #[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"]
    pub fn ZL_TypedBuffer_createWrapSerial(
        buffer: *mut ::std::os::raw::c_void,
        bufferCapacity: usize,
    ) -> *mut ZL_TypedBuffer;
}
extern "C" {
    #[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"]
    pub fn ZL_TypedBuffer_createWrapStruct(
        structBuffer: *mut ::std::os::raw::c_void,
        structWidth: usize,
        numStructs: usize,
    ) -> *mut ZL_TypedBuffer;
}
extern "C" {
    #[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"]
    pub fn ZL_TypedBuffer_createWrapNumeric(
        numArray: *mut ::std::os::raw::c_void,
        numWidth: usize,
        numCapacity: usize,
    ) -> *mut ZL_TypedBuffer;
}
extern "C" {
    #[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"]
    pub fn ZL_TypedBuffer_createWrapString(
        stringBuffer: *mut ::std::os::raw::c_void,
        stringBufferCapacity: usize,
        lenBuffer: *mut u32,
        maxNumStrings: usize,
    ) -> *mut ZL_TypedBuffer;
}
extern "C" {
    #[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"]
    pub fn ZL_DCtx_decompressTBuffer(
        dctx: *mut ZL_DCtx,
        output: *mut ZL_TypedBuffer,
        compressed: *const ::std::os::raw::c_void,
        cSize: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[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"]
    pub fn ZL_DCtx_decompressMultiTBuffer(
        dctx: *mut ZL_DCtx,
        outputs: *mut *mut ZL_TypedBuffer,
        nbOutputs: usize,
        compressed: *const ::std::os::raw::c_void,
        cSize: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[doc = " @brief Gets the type of the typed buffer.\n\n @param tbuffer Typed buffer object\n @return Type of the buffer"]
    pub fn ZL_TypedBuffer_type(tbuffer: *const ZL_TypedBuffer) -> ZL_Type;
}
extern "C" {
    #[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"]
    pub fn ZL_TypedBuffer_byteSize(tbuffer: *const ZL_TypedBuffer) -> usize;
}
extern "C" {
    #[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()"]
    pub fn ZL_TypedBuffer_rPtr(tbuffer: *const ZL_TypedBuffer) -> *const ::std::os::raw::c_void;
}
extern "C" {
    #[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."]
    pub fn ZL_TypedBuffer_numElts(tbuffer: *const ZL_TypedBuffer) -> usize;
}
extern "C" {
    #[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)"]
    pub fn ZL_TypedBuffer_eltWidth(tbuffer: *const ZL_TypedBuffer) -> usize;
}
extern "C" {
    #[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()"]
    pub fn ZL_TypedBuffer_rStringLens(tbuffer: *const ZL_TypedBuffer) -> *const u32;
}
extern "C" {
    #[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"]
    pub fn ZL_getHeaderSize(src: *const ::std::os::raw::c_void, srcSize: usize) -> ZL_Report;
}
pub type ZL_PipeDecoderFn = ::std::option::Option<
    unsafe extern "C" fn(
        dst: *mut ::std::os::raw::c_void,
        dstCapacity: usize,
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
    ) -> usize,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_PipeDecoderDesc {
    pub CTid: ZL_IDType,
    pub dstBound_f: ZL_PipeDstCapacityFn,
    pub transform_f: ZL_PipeDecoderFn,
    pub name: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_ZL_PipeDecoderDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_PipeDecoderDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_PipeDecoderDesc>(),
        32usize,
        "Size of ZL_PipeDecoderDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_PipeDecoderDesc>(),
        8usize,
        "Alignment of ZL_PipeDecoderDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_PipeDecoderDesc::CTid"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).dstBound_f) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_PipeDecoderDesc::dstBound_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_PipeDecoderDesc::transform_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_PipeDecoderDesc::name"
    );
}
extern "C" {
    #[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()."]
    pub fn ZL_DCtx_registerPipeDecoder(
        dctx: *mut ZL_DCtx,
        dtd: *const ZL_PipeDecoderDesc,
    ) -> ZL_Report;
}
pub type ZL_SplitDstCapacityFn =
    ::std::option::Option<unsafe extern "C" fn(src: *const ZL_RBuffer) -> usize>;
pub type ZL_SplitDecoderFn =
    ::std::option::Option<unsafe extern "C" fn(dst: ZL_WBuffer, src: *const ZL_RBuffer) -> usize>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_SplitDecoderDesc {
    pub CTid: ZL_IDType,
    pub nbInputStreams: usize,
    pub dstBound_f: ZL_SplitDstCapacityFn,
    pub transform_f: ZL_SplitDecoderFn,
    pub name: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_ZL_SplitDecoderDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_SplitDecoderDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_SplitDecoderDesc>(),
        40usize,
        "Size of ZL_SplitDecoderDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_SplitDecoderDesc>(),
        8usize,
        "Alignment of ZL_SplitDecoderDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).CTid) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_SplitDecoderDesc::CTid"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nbInputStreams) as usize - ptr as usize },
        8usize,
        "Offset of field: ZL_SplitDecoderDesc::nbInputStreams"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).dstBound_f) as usize - ptr as usize },
        16usize,
        "Offset of field: ZL_SplitDecoderDesc::dstBound_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_SplitDecoderDesc::transform_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_SplitDecoderDesc::name"
    );
}
extern "C" {
    #[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()."]
    pub fn ZL_DCtx_registerSplitDecoder(
        dctx: *mut ZL_DCtx,
        dtd: *const ZL_SplitDecoderDesc,
    ) -> ZL_Report;
}
pub type ZL_TypedDecoderFn = ::std::option::Option<
    unsafe extern "C" fn(dictx: *mut ZL_Decoder, src: *mut *const ZL_Input) -> ZL_Report,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_TypedDecoderDesc {
    pub gd: ZL_TypedGraphDesc,
    pub transform_f: ZL_TypedDecoderFn,
    pub name: *const ::std::os::raw::c_char,
    pub trStateMgr: ZL_CodecStateManager,
    #[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."]
    pub opaque: ZL_OpaquePtr,
}
#[test]
fn bindgen_test_layout_ZL_TypedDecoderDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_TypedDecoderDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_TypedDecoderDesc>(),
        88usize,
        "Size of ZL_TypedDecoderDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_TypedDecoderDesc>(),
        8usize,
        "Alignment of ZL_TypedDecoderDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_TypedDecoderDesc::gd"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
        24usize,
        "Offset of field: ZL_TypedDecoderDesc::transform_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        32usize,
        "Offset of field: ZL_TypedDecoderDesc::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
        40usize,
        "Offset of field: ZL_TypedDecoderDesc::trStateMgr"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
        64usize,
        "Offset of field: ZL_TypedDecoderDesc::opaque"
    );
}
extern "C" {
    #[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."]
    pub fn ZL_DCtx_registerTypedDecoder(
        dctx: *mut ZL_DCtx,
        dtd: *const ZL_TypedDecoderDesc,
    ) -> ZL_Report;
}
pub type ZL_VODecoderFn = ::std::option::Option<
    unsafe extern "C" fn(
        dictx: *mut ZL_Decoder,
        compulsorySrcs: *mut *const ZL_Input,
        nbCompulsorySrcs: usize,
        variableSrcs: *mut *const ZL_Input,
        nbVariableSrcs: usize,
    ) -> ZL_Report,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_VODecoderDesc {
    pub gd: ZL_VOGraphDesc,
    pub transform_f: ZL_VODecoderFn,
    pub name: *const ::std::os::raw::c_char,
    pub trStateMgr: ZL_CodecStateManager,
    #[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."]
    pub opaque: ZL_OpaquePtr,
}
#[test]
fn bindgen_test_layout_ZL_VODecoderDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_VODecoderDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_VODecoderDesc>(),
        104usize,
        "Size of ZL_VODecoderDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_VODecoderDesc>(),
        8usize,
        "Alignment of ZL_VODecoderDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_VODecoderDesc::gd"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
        40usize,
        "Offset of field: ZL_VODecoderDesc::transform_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        48usize,
        "Offset of field: ZL_VODecoderDesc::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
        56usize,
        "Offset of field: ZL_VODecoderDesc::trStateMgr"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
        80usize,
        "Offset of field: ZL_VODecoderDesc::opaque"
    );
}
extern "C" {
    #[doc = " Register a variable output decoder transform.\n Counterpart to ZS2_registerVOTransform()."]
    pub fn ZL_DCtx_registerVODecoder(dctx: *mut ZL_DCtx, dtd: *const ZL_VODecoderDesc)
        -> ZL_Report;
}
pub type ZL_MIDecoderFn = ::std::option::Option<
    unsafe extern "C" fn(
        dictx: *mut ZL_Decoder,
        compulsorySrcs: *mut *const ZL_Input,
        nbCompulsorySrcs: usize,
        variableSrcs: *mut *const ZL_Input,
        nbVariableSrcs: usize,
    ) -> ZL_Report,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_MIDecoderDesc {
    pub gd: ZL_MIGraphDesc,
    pub transform_f: ZL_MIDecoderFn,
    pub name: *const ::std::os::raw::c_char,
    pub trStateMgr: ZL_CodecStateManager,
    #[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."]
    pub opaque: ZL_OpaquePtr,
}
#[test]
fn bindgen_test_layout_ZL_MIDecoderDesc() {
    const UNINIT: ::std::mem::MaybeUninit<ZL_MIDecoderDesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ZL_MIDecoderDesc>(),
        128usize,
        "Size of ZL_MIDecoderDesc"
    );
    assert_eq!(
        ::std::mem::align_of::<ZL_MIDecoderDesc>(),
        8usize,
        "Alignment of ZL_MIDecoderDesc"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).gd) as usize - ptr as usize },
        0usize,
        "Offset of field: ZL_MIDecoderDesc::gd"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transform_f) as usize - ptr as usize },
        64usize,
        "Offset of field: ZL_MIDecoderDesc::transform_f"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        72usize,
        "Offset of field: ZL_MIDecoderDesc::name"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).trStateMgr) as usize - ptr as usize },
        80usize,
        "Offset of field: ZL_MIDecoderDesc::trStateMgr"
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
        104usize,
        "Offset of field: ZL_MIDecoderDesc::opaque"
    );
}
extern "C" {
    #[doc = " Register an MI decoder transform.\n Counterpart to ZS2_registerMITransform()."]
    pub fn ZL_DCtx_registerMIDecoder(dctx: *mut ZL_DCtx, dtd: *const ZL_MIDecoderDesc)
        -> ZL_Report;
}
extern "C" {
    pub fn ZL_Decoder_getScratchSpace(
        dictx: *mut ZL_Decoder,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    pub fn ZL_Decoder_create1OutStream(
        dictx: *mut ZL_Decoder,
        eltsCapacity: usize,
        eltWidth: usize,
    ) -> *mut ZL_Output;
}
extern "C" {
    pub fn ZL_Decoder_create1StringStream(
        dictx: *mut ZL_Decoder,
        nbStringsMax: usize,
        sumStringLensMax: usize,
    ) -> *mut ZL_Output;
}
extern "C" {
    pub fn ZL_Decoder_createTypedStream(
        dictx: *mut ZL_Decoder,
        index: ::std::os::raw::c_int,
        eltsCapacity: usize,
        eltWidth: usize,
    ) -> *mut ZL_Output;
}
extern "C" {
    pub fn ZL_Decoder_createStringStream(
        dictx: *mut ZL_Decoder,
        index: ::std::os::raw::c_int,
        nbStringsMax: usize,
        sumStringLensMax: usize,
    ) -> *mut ZL_Output;
}
extern "C" {
    pub fn ZL_Decoder_getCodecHeader(dictx: *const ZL_Decoder) -> ZL_RBuffer;
}
extern "C" {
    #[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!"]
    pub fn ZL_Decoder_getOpaquePtr(dictx: *const ZL_Decoder) -> *const ::std::os::raw::c_void;
}
extern "C" {
    #[doc = " @returns Returns a state, as generated by the Transform's State Manager."]
    pub fn ZL_Decoder_getState(dictx: *const ZL_Decoder) -> *mut ::std::os::raw::c_void;
}
pub const ZL_GraphType_standard: ZL_GraphType = 0;
pub const ZL_GraphType_static: ZL_GraphType = 1;
pub const ZL_GraphType_selector: ZL_GraphType = 2;
pub const ZL_GraphType_function: ZL_GraphType = 3;
pub const ZL_GraphType_multiInput: ZL_GraphType = 4;
pub const ZL_GraphType_parameterized: ZL_GraphType = 5;
pub const ZL_GraphType_segmenter: ZL_GraphType = 6;
pub type ZL_GraphType = ::std::os::raw::c_uint;
pub type ZL_Compressor_ForEachGraphCallback = ::std::option::Option<
    unsafe extern "C" fn(
        opaque: *mut ::std::os::raw::c_void,
        compressor: *const ZL_Compressor,
        graphID: ZL_GraphID,
    ) -> ZL_Report,
>;
extern "C" {
    #[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."]
    pub fn ZL_Compressor_forEachGraph(
        compressor: *const ZL_Compressor,
        callback: ZL_Compressor_ForEachGraphCallback,
        opaque: *mut ::std::os::raw::c_void,
    ) -> ZL_Report;
}
pub type ZL_Compressor_ForEachNodeCallback = ::std::option::Option<
    unsafe extern "C" fn(
        opaque: *mut ::std::os::raw::c_void,
        compressor: *const ZL_Compressor,
        graphID: ZL_NodeID,
    ) -> ZL_Report,
>;
extern "C" {
    #[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."]
    pub fn ZL_Compressor_forEachNode(
        compressor: *const ZL_Compressor,
        callback: ZL_Compressor_ForEachNodeCallback,
        opaque: *mut ::std::os::raw::c_void,
    ) -> ZL_Report;
}
pub type ZL_Compressor_ForEachParamCallback = ::std::option::Option<
    unsafe extern "C" fn(
        opaque: *mut ::std::os::raw::c_void,
        param: ZL_CParam,
        val: ::std::os::raw::c_int,
    ) -> ZL_Report,
>;
extern "C" {
    #[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)."]
    pub fn ZL_Compressor_forEachParam(
        compressor: *const ZL_Compressor,
        callback: ZL_Compressor_ForEachParamCallback,
        opaque: *mut ::std::os::raw::c_void,
    ) -> ZL_Report;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_getStartingGraphID(
        compressor: *const ZL_Compressor,
        graphID: *mut ZL_GraphID,
    ) -> bool;
}
extern "C" {
    #[doc = " @returns The @ref ZL_GraphType of the given graph.\n @note This is the original type the graph was registered with."]
    pub fn ZL_Compressor_getGraphType(
        compressor: *const ZL_Compressor,
        graph: ZL_GraphID,
    ) -> ZL_GraphType;
}
extern "C" {
    #[doc = " @returns the (optional) @p name given to this graphid.\n When none provided, returns \"\".\n When graphid is illegal (invalid), returns NULL."]
    pub fn ZL_Compressor_Graph_getName(
        cgraph: *const ZL_Compressor,
        graphid: ZL_GraphID,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[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"]
    pub fn ZL_Compressor_Graph_getInput0Mask(
        cgraph: *const ZL_Compressor,
        graphid: ZL_GraphID,
    ) -> ZL_Type;
}
extern "C" {
    #[doc = " @returns The input stream types that @p graphid input @p inputIdx is\n compatible with."]
    pub fn ZL_Compressor_Graph_getInputMask(
        compressor: *const ZL_Compressor,
        graphid: ZL_GraphID,
        inputIdx: usize,
    ) -> ZL_Type;
}
extern "C" {
    #[doc = " @returns The number of input streams that @p graphid expects."]
    pub fn ZL_Compressor_Graph_getNumInputs(
        compressor: *const ZL_Compressor,
        graphid: ZL_GraphID,
    ) -> usize;
}
extern "C" {
    #[doc = " @returns True if @p graphid is a multi input graph whose last\n input may show up zero or more times."]
    pub fn ZL_Compressor_Graph_isVariableInput(
        compressor: *const ZL_Compressor,
        graphid: ZL_GraphID,
    ) -> bool;
}
extern "C" {
    #[doc = " @returns The head node of the graph if @p graphid is a static graph,\n otherwise returns ZL_NODE_ILLEGAL."]
    pub fn ZL_Compressor_Graph_getHeadNode(
        compressor: *const ZL_Compressor,
        graphid: ZL_GraphID,
    ) -> ZL_NodeID;
}
extern "C" {
    #[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`."]
    pub fn ZL_Compressor_Graph_getBaseGraphID(
        compressor: *const ZL_Compressor,
        graphid: ZL_GraphID,
    ) -> ZL_GraphID;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_Graph_getSuccessors(
        compressor: *const ZL_Compressor,
        graphid: ZL_GraphID,
    ) -> ZL_GraphIDList;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_Graph_getCustomNodes(
        compressor: *const ZL_Compressor,
        graphid: ZL_GraphID,
    ) -> ZL_NodeIDList;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_Graph_getCustomGraphs(
        compressor: *const ZL_Compressor,
        graphid: ZL_GraphID,
    ) -> ZL_GraphIDList;
}
extern "C" {
    #[doc = " @returns The local params of @p graphid.\n @note The params for the lifetime of the @p compressor."]
    pub fn ZL_Compressor_Graph_getLocalParams(
        compressor: *const ZL_Compressor,
        graphid: ZL_GraphID,
    ) -> ZL_LocalParams;
}
extern "C" {
    #[doc = " @returns The number of input streams that @p node expects\n in the context of the @p cgraph."]
    pub fn ZL_Compressor_Node_getNumInputs(cgraph: *const ZL_Compressor, node: ZL_NodeID) -> usize;
}
extern "C" {
    #[doc = " @returns The input stream type that @p node expects\n @pre @p node must be valid, and must have a single input stream"]
    pub fn ZL_Compressor_Node_getInput0Type(
        cgraph: *const ZL_Compressor,
        node: ZL_NodeID,
    ) -> ZL_Type;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_Node_getInputType(
        cgraph: *const ZL_Compressor,
        nodeid: ZL_NodeID,
        inputIndex: ZL_IDType,
    ) -> ZL_Type;
}
extern "C" {
    #[doc = " @returns True if @p nodeid is a multi input codec whose last\n input may show up zero or more times."]
    pub fn ZL_Compressor_Node_isVariableInput(
        compressor: *const ZL_Compressor,
        nodeid: ZL_NodeID,
    ) -> bool;
}
extern "C" {
    #[doc = " @returns The number of output outcomes that @p node has\n in the context of the @p cgraph."]
    pub fn ZL_Compressor_Node_getNumOutcomes(
        cgraph: *const ZL_Compressor,
        node: ZL_NodeID,
    ) -> usize;
}
extern "C" {
    #[doc = " @returns The number of variable output that @p node has\n in the context of the @p cgraph."]
    pub fn ZL_Compressor_Node_getNumVariableOutcomes(
        cgraph: *const ZL_Compressor,
        node: ZL_NodeID,
    ) -> usize;
}
extern "C" {
    #[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)"]
    pub fn ZL_Compressor_Node_getOutputType(
        cgraph: *const ZL_Compressor,
        node: ZL_NodeID,
        outputIndex: ::std::os::raw::c_int,
    ) -> ZL_Type;
}
extern "C" {
    #[doc = " @returns The local params of @p nodeid.\n @note The params for the lifetime of the @p compressor."]
    pub fn ZL_Compressor_Node_getLocalParams(
        cgraph: *const ZL_Compressor,
        nodeid: ZL_NodeID,
    ) -> ZL_LocalParams;
}
extern "C" {
    #[doc = " @returns the max format version that @p node supports\n in the context of the @p cgraph."]
    pub fn ZL_Compressor_Node_getMaxVersion(
        cgraph: *const ZL_Compressor,
        node: ZL_NodeID,
    ) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = " @returns the min format version that @p node supports\n in the context of the @p cgraph."]
    pub fn ZL_Compressor_Node_getMinVersion(
        cgraph: *const ZL_Compressor,
        node: ZL_NodeID,
    ) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[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."]
    pub fn ZL_Compressor_Node_getCodecID(
        cgraph: *const ZL_Compressor,
        node: ZL_NodeID,
    ) -> ZL_IDType;
}
extern "C" {
    #[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`."]
    pub fn ZL_Compressor_Node_getBaseNodeID(
        cgraph: *const ZL_Compressor,
        node: ZL_NodeID,
    ) -> ZL_NodeID;
}
extern "C" {
    #[doc = " @returns The name of the node if available, else \"\", and returns NULL if @p\n node is invalid."]
    pub fn ZL_Compressor_Node_getName(
        cgraph: *const ZL_Compressor,
        node: ZL_NodeID,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " @returns a boolean value indicating whether the node is standard or not."]
    pub fn ZL_Compressor_Node_isStandard(cgraph: *const ZL_Compressor, node: ZL_NodeID) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_ReflectionCtx_s {
    _unused: [u8; 0],
}
#[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."]
pub type ZL_ReflectionCtx = ZL_ReflectionCtx_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_DataInfo_s {
    _unused: [u8; 0],
}
pub type ZL_DataInfo = ZL_DataInfo_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_CodecInfo_s {
    _unused: [u8; 0],
}
pub type ZL_CodecInfo = ZL_CodecInfo_s;
extern "C" {
    pub fn ZL_ReflectionCtx_create() -> *mut ZL_ReflectionCtx;
}
extern "C" {
    pub fn ZL_ReflectionCtx_free(rctx: *mut ZL_ReflectionCtx);
}
extern "C" {
    #[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()."]
    pub fn ZL_ReflectionCtx_getDCtx(rctx: *mut ZL_ReflectionCtx) -> *mut ZL_DCtx;
}
extern "C" {
    #[doc = " Registers a custom transform to be used when decoding the frame.\n @pre Must be called before ZL_ReflectionCtx_setCompressedFrame()."]
    pub fn ZL_ReflectionCtx_registerTypedDecoder(
        rctx: *mut ZL_ReflectionCtx,
        dtd: *const ZL_TypedDecoderDesc,
    );
}
extern "C" {
    #[doc = " Registers a custom transform to be used when decoding the frame.\n @pre Must be called before ZL_ReflectionCtx_setCompressedFrame()."]
    pub fn ZL_ReflectionCtx_registerVODecoder(
        rctx: *mut ZL_ReflectionCtx,
        dtd: *const ZL_VODecoderDesc,
    );
}
extern "C" {
    #[doc = " Registers a custom transform to be used when decoding the frame.\n @pre Must be called before ZL_ReflectionCtx_setCompressedFrame()."]
    pub fn ZL_ReflectionCtx_registerMIDecoder(
        rctx: *mut ZL_ReflectionCtx,
        dtd: *const ZL_MIDecoderDesc,
    );
}
extern "C" {
    #[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."]
    pub fn ZL_ReflectionCtx_setCompressedFrame(
        rctx: *mut ZL_ReflectionCtx,
        src: *const ::std::os::raw::c_void,
        srcSize: usize,
    ) -> ZL_Report;
}
extern "C" {
    #[doc = " @returns The frame format version.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
    pub fn ZL_ReflectionCtx_getFrameFormatVersion(rctx: *const ZL_ReflectionCtx) -> u32;
}
extern "C" {
    #[doc = " @returns The size of the frame header.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
    pub fn ZL_ReflectionCtx_getFrameHeaderSize(rctx: *const ZL_ReflectionCtx) -> usize;
}
extern "C" {
    #[doc = " @returns The size of the frame footer.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
    pub fn ZL_ReflectionCtx_getFrameFooterSize(rctx: *const ZL_ReflectionCtx) -> usize;
}
extern "C" {
    #[doc = " @returns The total size of all the transform headers.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
    pub fn ZL_ReflectionCtx_getTotalTransformHeaderSize_lastChunk(
        rctx: *const ZL_ReflectionCtx,
    ) -> usize;
}
extern "C" {
    #[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."]
    pub fn ZL_ReflectionCtx_getNumStreams_lastChunk(rctx: *const ZL_ReflectionCtx) -> usize;
}
extern "C" {
    #[doc = " @returns The stream at @p index\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success.\n @pre @p index is valid."]
    pub fn ZL_ReflectionCtx_getStream_lastChunk(
        rctx: *const ZL_ReflectionCtx,
        index: usize,
    ) -> *const ZL_DataInfo;
}
extern "C" {
    #[doc = " @returns The number of input streams to the compressed frame.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
    pub fn ZL_ReflectionCtx_getNumInputs(rctx: *const ZL_ReflectionCtx) -> usize;
}
extern "C" {
    #[doc = " @returns The input stream at @p index\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success.\n @pre @p index is valid."]
    pub fn ZL_ReflectionCtx_getInput(
        rctx: *const ZL_ReflectionCtx,
        index: usize,
    ) -> *const ZL_DataInfo;
}
extern "C" {
    #[doc = " @returns The number of streams stored in the compressed frame.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
    pub fn ZL_ReflectionCtx_getNumStoredOutputs_lastChunk(rctx: *const ZL_ReflectionCtx) -> usize;
}
extern "C" {
    #[doc = " @returns The stored stream at @p index\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success.\n @pre @p index is valid."]
    pub fn ZL_ReflectionCtx_getStoredOutput_lastChunk(
        rctx: *const ZL_ReflectionCtx,
        index: usize,
    ) -> *const ZL_DataInfo;
}
extern "C" {
    #[doc = " @returns the number of transforms that are run during the decoding process.\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success."]
    pub fn ZL_ReflectionCtx_getNumCodecs_lastChunk(rctx: *const ZL_ReflectionCtx) -> usize;
}
extern "C" {
    #[doc = " @returns The transform at @p index\n @pre ZL_ReflectionCtx_setCompressedFrame() returned success.\n @pre @p index is valid."]
    pub fn ZL_ReflectionCtx_getCodec_lastChunk(
        rctx: *const ZL_ReflectionCtx,
        index: usize,
    ) -> *const ZL_CodecInfo;
}
extern "C" {
    #[doc = " @returns The type of the stream."]
    pub fn ZL_DataInfo_getType(si: *const ZL_DataInfo) -> ZL_Type;
}
extern "C" {
    #[doc = " @returns The number of elements in the stream."]
    pub fn ZL_DataInfo_getNumElts(si: *const ZL_DataInfo) -> usize;
}
extern "C" {
    #[doc = " @returns The element width of the stream."]
    pub fn ZL_DataInfo_getEltWidth(si: *const ZL_DataInfo) -> usize;
}
extern "C" {
    #[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."]
    pub fn ZL_DataInfo_getContentSize(si: *const ZL_DataInfo) -> usize;
}
extern "C" {
    #[doc = " @returns The index for which ZL_ReflectionCtx_getStream_lastChunk() returns\n this stream."]
    pub fn ZL_DataInfo_getIndex(si: *const ZL_DataInfo) -> usize;
}
extern "C" {
    #[doc = " @returns The data pointer for the stream."]
    pub fn ZL_DataInfo_getDataPtr(si: *const ZL_DataInfo) -> *const ::std::os::raw::c_void;
}
extern "C" {
    #[doc = " @returns The length pointer for the stream if the type is\n ZL_Type_string.\n @pre The type is ZL_Type_string."]
    pub fn ZL_DataInfo_getLengthsPtr(si: *const ZL_DataInfo) -> *const u32;
}
extern "C" {
    #[doc = " @returns The transform that produced this stream or NULL\n if the stream is stored in the frame."]
    pub fn ZL_DataInfo_getProducerCodec(si: *const ZL_DataInfo) -> *const ZL_CodecInfo;
}
extern "C" {
    #[doc = " @returns The transform that consumes this stream or NULL\n if the stream is an input stream to the frame."]
    pub fn ZL_DataInfo_getConsumerCodec(si: *const ZL_DataInfo) -> *const ZL_CodecInfo;
}
extern "C" {
    #[doc = " @returns The name of the transform"]
    pub fn ZL_CodecInfo_getName(ti: *const ZL_CodecInfo) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " @returns The transform ID"]
    pub fn ZL_CodecInfo_getCodecID(ti: *const ZL_CodecInfo) -> ZL_IDType;
}
extern "C" {
    #[doc = " @returns true iff the transform is a standard transform."]
    pub fn ZL_CodecInfo_isStandardCodec(ti: *const ZL_CodecInfo) -> bool;
}
extern "C" {
    #[doc = " @returns true iff the transform is a custom transform."]
    pub fn ZL_CodecInfo_isCustomCodec(ti: *const ZL_CodecInfo) -> bool;
}
extern "C" {
    #[doc = " @returns The index for which ZL_ReflectionCtx_getCodec_lastChunk() returns\n this transform."]
    pub fn ZL_CodecInfo_getIndex(ti: *const ZL_CodecInfo) -> usize;
}
extern "C" {
    #[doc = " @returns The header pointer for the transform."]
    pub fn ZL_CodecInfo_getHeaderPtr(ti: *const ZL_CodecInfo) -> *const ::std::os::raw::c_void;
}
extern "C" {
    #[doc = " @returns The header size of the transform."]
    pub fn ZL_CodecInfo_getHeaderSize(ti: *const ZL_CodecInfo) -> usize;
}
extern "C" {
    #[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."]
    pub fn ZL_CodecInfo_getNumInputs(ti: *const ZL_CodecInfo) -> usize;
}
extern "C" {
    #[doc = " @returns The input stream of the transform at index @p index\n @pre index is valid"]
    pub fn ZL_CodecInfo_getInput(ti: *const ZL_CodecInfo, index: usize) -> *const ZL_DataInfo;
}
extern "C" {
    #[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."]
    pub fn ZL_CodecInfo_getNumOutputs(ti: *const ZL_CodecInfo) -> usize;
}
extern "C" {
    #[doc = " @returns The output stream of the transform at index @p index\n @pre index is valid"]
    pub fn ZL_CodecInfo_getOutput(ti: *const ZL_CodecInfo, index: usize) -> *const ZL_DataInfo;
}
extern "C" {
    #[doc = " @returns The number of output streams of the transform that are\n variable outputs. Necessarily no greater than\n ZL_CodecInfo_getOutput()."]
    pub fn ZL_CodecInfo_getNumVariableOutputs(ti: *const ZL_CodecInfo) -> usize;
}