openzl-sys-rs 0.2.0

Low-level Rust bindings to statically linked OpenZL (facebook/openzl). Source downloaded at build time.
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
/* 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_graph_parser_malformedInput__desc_str: &[u8; 35] =
    b"Parser encountered malformed input\0";
pub const ZL_ErrorCode_graph_parser_unhandledInput__desc_str: &[u8; 35] =
    b"Parser encountered unhandled input\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_ErrorCode_dict_corruption__desc_str: &[u8; 31] = b"Dictionary corruption detected\0";
pub const ZL_ErrorCode_dict_materialization__desc_str: &[u8; 35] =
    b"Dictionary materialization failure\0";
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 = 2;
pub const ZL_LIBRARY_VERSION_PATCH: u32 = 1;
pub const ZL_LIBRARY_VERSION_NUMBER: u32 = 201;
pub const ZL_MIN_FORMAT_VERSION: u32 = 8;
pub const ZL_MAX_FORMAT_VERSION: u32 = 25;
pub const ZL_CHUNK_VERSION_MIN: u32 = 21;
pub const ZL_TYPED_INPUT_VERSION_MIN: u32 = 14;
pub const ZL_MATERIALIZED_DICT_VERSION_MIN: u32 = 25;
pub const ZL_IS_FBCODE: u32 = 0;
pub const ZL_FBCODE_IS_RELEASE: u32 = 0;
pub const ZL_MIN_CHUNK_SIZE: u32 = 32768;
pub const ZL_CHUNK_OVERHEAD_MAX: u32 = 16;
pub const ZL_FRAME_OVERHEAD_MAX: u32 = 64;
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_LZ_MIN_MATCH_LENGTH_METADATA_ID: u32 = 77;
pub const ZL_LZ4_COMPRESSION_LEVEL_OVERRIDE_PID: u32 = 0;
pub const ZL_MUX_LENGTHS_SPLIT_POINT_PID: u32 = 0;
pub const ZL_MUX_LENGTHS_MATCH_LENGTH_BIAS_PID: u32 = 1;
pub const ZL_SDDL_DESCRIPTION_PID: u32 = 522;
pub const ZL_SENTINEL_INDICES_PID: u32 = 130;
pub const ZL_SENTINEL_VALUE_PID: u32 = 131;
pub const ZL_SPLIT_BYRANGE_MIN_SEGMENT_SIZE_PID: u32 = 324;
pub const ZL_SPLIT_CHANNEL_ID: u32 = 867;
pub const ZL_TOKENIZE_SORT_PID: u32 = 0;
pub type ZL_IDType = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_UniqueID {
    pub bytes: [::std::os::raw::c_uchar; 32usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_UniqueID"][::std::mem::size_of::<ZL_UniqueID>() - 32usize];
    ["Alignment of ZL_UniqueID"][::std::mem::align_of::<ZL_UniqueID>() - 1usize];
    ["Offset of field: ZL_UniqueID::bytes"][::std::mem::offset_of!(ZL_UniqueID, bytes) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_DataID {
    pub sid: ZL_IDType,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_DataID"][::std::mem::size_of::<ZL_DataID>() - 4usize];
    ["Alignment of ZL_DataID"][::std::mem::align_of::<ZL_DataID>() - 4usize];
    ["Offset of field: ZL_DataID::sid"][::std::mem::offset_of!(ZL_DataID, sid) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_NodeID {
    pub nid: ZL_IDType,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_NodeID"][::std::mem::size_of::<ZL_NodeID>() - 4usize];
    ["Alignment of ZL_NodeID"][::std::mem::align_of::<ZL_NodeID>() - 4usize];
    ["Offset of field: ZL_NodeID::nid"][::std::mem::offset_of!(ZL_NodeID, nid) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_GraphID {
    pub gid: ZL_IDType,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_GraphID"][::std::mem::size_of::<ZL_GraphID>() - 4usize];
    ["Alignment of ZL_GraphID"][::std::mem::align_of::<ZL_GraphID>() - 4usize];
    ["Offset of field: ZL_GraphID::gid"][::std::mem::offset_of!(ZL_GraphID, gid) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_DictID {
    pub id: ZL_UniqueID,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_DictID"][::std::mem::size_of::<ZL_DictID>() - 32usize];
    ["Alignment of ZL_DictID"][::std::mem::align_of::<ZL_DictID>() - 1usize];
    ["Offset of field: ZL_DictID::id"][::std::mem::offset_of!(ZL_DictID, id) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_MParamID {
    pub id: ZL_UniqueID,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_MParamID"][::std::mem::size_of::<ZL_MParamID>() - 32usize];
    ["Alignment of ZL_MParamID"][::std::mem::align_of::<ZL_MParamID>() - 1usize];
    ["Offset of field: ZL_MParamID::id"][::std::mem::offset_of!(ZL_MParamID, id) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_BundleID {
    pub id: ZL_UniqueID,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_BundleID"][::std::mem::size_of::<ZL_BundleID>() - 32usize];
    ["Alignment of ZL_BundleID"][::std::mem::align_of::<ZL_BundleID>() - 1usize];
    ["Offset of field: ZL_BundleID::id"][::std::mem::offset_of!(ZL_BundleID, id) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Stream_s {
    _unused: [u8; 0],
}
pub type Stream = Stream_s;
pub type ZL_Data = Stream;
#[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],
}
pub type ZL_Compressor = ZL_Compressor_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Materializer_s {
    _unused: [u8; 0],
}
pub type ZL_Materializer = ZL_Materializer_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],
}
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;
#[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;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Segmenter_s {
    _unused: [u8; 0],
}
pub type ZL_Segmenter = ZL_Segmenter_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_DictLoader_s {
    _unused: [u8; 0],
}
pub type ZL_DictLoader = ZL_DictLoader_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_FatBundleDictLoader_s {
    _unused: [u8; 0],
}
pub type ZL_FatBundleDictLoader = ZL_FatBundleDictLoader_s;
pub const ZL_TernaryParam_ZL_TernaryParam_auto: ZL_TernaryParam = 0;
pub const ZL_TernaryParam_ZL_TernaryParam_enable: ZL_TernaryParam = 1;
pub const ZL_TernaryParam_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,
        ),
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_OpaquePtr"][::std::mem::size_of::<ZL_OpaquePtr>() - 24usize];
    ["Alignment of ZL_OpaquePtr"][::std::mem::align_of::<ZL_OpaquePtr>() - 8usize];
    ["Offset of field: ZL_OpaquePtr::ptr"][::std::mem::offset_of!(ZL_OpaquePtr, ptr) - 0usize];
    ["Offset of field: ZL_OpaquePtr::freeOpaquePtr"]
        [::std::mem::offset_of!(ZL_OpaquePtr, freeOpaquePtr) - 8usize];
    ["Offset of field: ZL_OpaquePtr::freeFn"]
        [::std::mem::offset_of!(ZL_OpaquePtr, freeFn) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_GraphIDList {
    pub graphids: *const ZL_GraphID,
    pub nbGraphIDs: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_GraphIDList"][::std::mem::size_of::<ZL_GraphIDList>() - 16usize];
    ["Alignment of ZL_GraphIDList"][::std::mem::align_of::<ZL_GraphIDList>() - 8usize];
    ["Offset of field: ZL_GraphIDList::graphids"]
        [::std::mem::offset_of!(ZL_GraphIDList, graphids) - 0usize];
    ["Offset of field: ZL_GraphIDList::nbGraphIDs"]
        [::std::mem::offset_of!(ZL_GraphIDList, nbGraphIDs) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_NodeIDList {
    pub nodeids: *const ZL_NodeID,
    pub nbNodeIDs: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_NodeIDList"][::std::mem::size_of::<ZL_NodeIDList>() - 16usize];
    ["Alignment of ZL_NodeIDList"][::std::mem::align_of::<ZL_NodeIDList>() - 8usize];
    ["Offset of field: ZL_NodeIDList::nodeids"]
        [::std::mem::offset_of!(ZL_NodeIDList, nodeids) - 0usize];
    ["Offset of field: ZL_NodeIDList::nbNodeIDs"]
        [::std::mem::offset_of!(ZL_NodeIDList, nbNodeIDs) - 8usize];
};
#[doc = " @brief Data layout for comment contained in the frame header."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Comment {
    pub data: *const ::std::os::raw::c_void,
    pub size: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Comment"][::std::mem::size_of::<ZL_Comment>() - 16usize];
    ["Alignment of ZL_Comment"][::std::mem::align_of::<ZL_Comment>() - 8usize];
    ["Offset of field: ZL_Comment::data"][::std::mem::offset_of!(ZL_Comment, data) - 0usize];
    ["Offset of field: ZL_Comment::size"][::std::mem::offset_of!(ZL_Comment, size) - 8usize];
};
#[doc = " @brief Typedef for void pointer to satisfy ZL_RESULT_OF requirements.\n\n ZL_RESULT_OF requires a bare type name, so we need a typedef for void*. You\n should use ZL_RESULT_OF(VoidPtr) instead of ZL_RESULT_OF(void*) and similarly\n with ZL_RESULT_DECLARE_SCOPE"]
pub type ZL_VoidPtr = *mut ::std::os::raw::c_void;
pub type ZL_ConstVoidPtr = *const ::std::os::raw::c_void;
#[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_ZL_ErrorCode_no_error: ZL_ErrorCode = 0;
pub const ZL_ErrorCode_ZL_ErrorCode_GENERIC: ZL_ErrorCode = 1;
pub const ZL_ErrorCode_ZL_ErrorCode_srcSize_tooSmall: ZL_ErrorCode = 3;
pub const ZL_ErrorCode_ZL_ErrorCode_srcSize_tooLarge: ZL_ErrorCode = 4;
pub const ZL_ErrorCode_ZL_ErrorCode_dstCapacity_tooSmall: ZL_ErrorCode = 5;
pub const ZL_ErrorCode_ZL_ErrorCode_userBuffer_alignmentIncorrect: ZL_ErrorCode = 6;
pub const ZL_ErrorCode_ZL_ErrorCode_decompression_incorrectAPI: ZL_ErrorCode = 7;
pub const ZL_ErrorCode_ZL_ErrorCode_userBuffers_invalidNum: ZL_ErrorCode = 8;
pub const ZL_ErrorCode_ZL_ErrorCode_invalidName: ZL_ErrorCode = 9;
pub const ZL_ErrorCode_ZL_ErrorCode_header_unknown: ZL_ErrorCode = 10;
pub const ZL_ErrorCode_ZL_ErrorCode_frameParameter_unsupported: ZL_ErrorCode = 11;
pub const ZL_ErrorCode_ZL_ErrorCode_corruption: ZL_ErrorCode = 12;
pub const ZL_ErrorCode_ZL_ErrorCode_compressedChecksumWrong: ZL_ErrorCode = 13;
pub const ZL_ErrorCode_ZL_ErrorCode_contentChecksumWrong: ZL_ErrorCode = 14;
pub const ZL_ErrorCode_ZL_ErrorCode_outputs_tooNumerous: ZL_ErrorCode = 15;
pub const ZL_ErrorCode_ZL_ErrorCode_compressionParameter_invalid: ZL_ErrorCode = 20;
pub const ZL_ErrorCode_ZL_ErrorCode_parameter_invalid: ZL_ErrorCode = 21;
pub const ZL_ErrorCode_ZL_ErrorCode_outputID_invalid: ZL_ErrorCode = 22;
pub const ZL_ErrorCode_ZL_ErrorCode_invalidRequest_singleOutputFrameOnly: ZL_ErrorCode = 23;
pub const ZL_ErrorCode_ZL_ErrorCode_outputNotCommitted: ZL_ErrorCode = 24;
pub const ZL_ErrorCode_ZL_ErrorCode_outputNotReserved: ZL_ErrorCode = 25;
pub const ZL_ErrorCode_ZL_ErrorCode_segmenter_inputNotConsumed: ZL_ErrorCode = 26;
pub const ZL_ErrorCode_ZL_ErrorCode_segmenter_noSegments: ZL_ErrorCode = 27;
pub const ZL_ErrorCode_ZL_ErrorCode_graph_invalid: ZL_ErrorCode = 30;
pub const ZL_ErrorCode_ZL_ErrorCode_graph_nonserializable: ZL_ErrorCode = 31;
pub const ZL_ErrorCode_ZL_ErrorCode_invalidTransform: ZL_ErrorCode = 32;
pub const ZL_ErrorCode_ZL_ErrorCode_graph_invalidNumInputs: ZL_ErrorCode = 33;
pub const ZL_ErrorCode_ZL_ErrorCode_graph_parser_malformedInput: ZL_ErrorCode = 34;
pub const ZL_ErrorCode_ZL_ErrorCode_graph_parser_unhandledInput: ZL_ErrorCode = 35;
pub const ZL_ErrorCode_ZL_ErrorCode_successor_invalid: ZL_ErrorCode = 40;
pub const ZL_ErrorCode_ZL_ErrorCode_successor_alreadySet: ZL_ErrorCode = 41;
pub const ZL_ErrorCode_ZL_ErrorCode_successor_invalidNumInputs: ZL_ErrorCode = 42;
pub const ZL_ErrorCode_ZL_ErrorCode_inputType_unsupported: ZL_ErrorCode = 43;
pub const ZL_ErrorCode_ZL_ErrorCode_graphParameter_invalid: ZL_ErrorCode = 44;
pub const ZL_ErrorCode_ZL_ErrorCode_nodeParameter_invalid: ZL_ErrorCode = 50;
pub const ZL_ErrorCode_ZL_ErrorCode_nodeParameter_invalidValue: ZL_ErrorCode = 51;
pub const ZL_ErrorCode_ZL_ErrorCode_transform_executionFailure: ZL_ErrorCode = 52;
pub const ZL_ErrorCode_ZL_ErrorCode_customNode_definitionInvalid: ZL_ErrorCode = 53;
pub const ZL_ErrorCode_ZL_ErrorCode_node_unexpected_input_type: ZL_ErrorCode = 54;
pub const ZL_ErrorCode_ZL_ErrorCode_node_invalid_input: ZL_ErrorCode = 55;
pub const ZL_ErrorCode_ZL_ErrorCode_node_invalid: ZL_ErrorCode = 56;
pub const ZL_ErrorCode_ZL_ErrorCode_nodeExecution_invalidOutputs: ZL_ErrorCode = 57;
pub const ZL_ErrorCode_ZL_ErrorCode_nodeRegen_countIncorrect: ZL_ErrorCode = 58;
pub const ZL_ErrorCode_ZL_ErrorCode_formatVersion_unsupported: ZL_ErrorCode = 60;
pub const ZL_ErrorCode_ZL_ErrorCode_formatVersion_notSet: ZL_ErrorCode = 61;
pub const ZL_ErrorCode_ZL_ErrorCode_node_versionMismatch: ZL_ErrorCode = 62;
pub const ZL_ErrorCode_ZL_ErrorCode_dict_corruption: ZL_ErrorCode = 65;
pub const ZL_ErrorCode_ZL_ErrorCode_dict_materialization: ZL_ErrorCode = 66;
pub const ZL_ErrorCode_ZL_ErrorCode_noValidMaterialization: ZL_ErrorCode = 67;
pub const ZL_ErrorCode_ZL_ErrorCode_dictNoRecord: ZL_ErrorCode = 68;
pub const ZL_ErrorCode_ZL_ErrorCode_allocation: ZL_ErrorCode = 70;
pub const ZL_ErrorCode_ZL_ErrorCode_internalBuffer_tooSmall: ZL_ErrorCode = 71;
pub const ZL_ErrorCode_ZL_ErrorCode_integerOverflow: ZL_ErrorCode = 72;
pub const ZL_ErrorCode_ZL_ErrorCode_stream_wrongInit: ZL_ErrorCode = 73;
pub const ZL_ErrorCode_ZL_ErrorCode_streamType_incorrect: ZL_ErrorCode = 74;
pub const ZL_ErrorCode_ZL_ErrorCode_streamCapacity_tooSmall: ZL_ErrorCode = 75;
pub const ZL_ErrorCode_ZL_ErrorCode_streamParameter_invalid: ZL_ErrorCode = 76;
pub const ZL_ErrorCode_ZL_ErrorCode_logicError: ZL_ErrorCode = 80;
pub const ZL_ErrorCode_ZL_ErrorCode_temporaryLibraryLimitation: ZL_ErrorCode = 81;
pub const ZL_ErrorCode_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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_GraphContext"][::std::mem::size_of::<ZL_GraphContext>() - 24usize];
    ["Alignment of ZL_GraphContext"][::std::mem::align_of::<ZL_GraphContext>() - 8usize];
    ["Offset of field: ZL_GraphContext::nodeID"]
        [::std::mem::offset_of!(ZL_GraphContext, nodeID) - 0usize];
    ["Offset of field: ZL_GraphContext::graphID"]
        [::std::mem::offset_of!(ZL_GraphContext, graphID) - 4usize];
    ["Offset of field: ZL_GraphContext::transformID"]
        [::std::mem::offset_of!(ZL_GraphContext, transformID) - 8usize];
    ["Offset of field: ZL_GraphContext::name"]
        [::std::mem::offset_of!(ZL_GraphContext, name) - 16usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_ErrorContext"][::std::mem::size_of::<ZL_ErrorContext>() - 32usize];
    ["Alignment of ZL_ErrorContext"][::std::mem::align_of::<ZL_ErrorContext>() - 8usize];
    ["Offset of field: ZL_ErrorContext::opCtx"]
        [::std::mem::offset_of!(ZL_ErrorContext, opCtx) - 0usize];
    ["Offset of field: ZL_ErrorContext::graphCtx"]
        [::std::mem::offset_of!(ZL_ErrorContext, graphCtx) - 8usize];
};
unsafe extern "C" {
    pub fn ZL_Compressor_getOperationContext(ctx: *mut ZL_Compressor) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_CCtx_getOperationContext(ctx: *mut ZL_CCtx) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_DCtx_getOperationContext(ctx: *mut ZL_DCtx) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_Encoder_getOperationContext(ctx: *mut ZL_Encoder) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_Decoder_getOperationContext(ctx: *mut ZL_Decoder) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_Graph_getOperationContext(ctx: *mut ZL_Graph) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_Edge_getOperationContext(ctx: *mut ZL_Edge) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_CompressorSerializer_getOperationContext(
        ctx: *mut ZL_CompressorSerializer,
    ) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_CompressorDeserializer_getOperationContext(
        ctx: *mut ZL_CompressorDeserializer,
    ) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_Segmenter_getOperationContext(ctx: *mut ZL_Segmenter) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_Materializer_getOperationContext(
        ctx: *mut ZL_Materializer,
    ) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_ErrorContext_getOperationContext(
        ctx: *mut ZL_ErrorContext,
    ) -> *mut ZL_OperationContext;
}
unsafe extern "C" {
    pub fn ZL_NULL_getOperationContext(
        ctx: *mut ::std::os::raw::c_void,
    ) -> *mut ZL_OperationContext;
}
unsafe 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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_StaticErrorInfo_s"][::std::mem::size_of::<ZL_StaticErrorInfo_s>() - 40usize];
    ["Alignment of ZL_StaticErrorInfo_s"][::std::mem::align_of::<ZL_StaticErrorInfo_s>() - 8usize];
    ["Offset of field: ZL_StaticErrorInfo_s::code"]
        [::std::mem::offset_of!(ZL_StaticErrorInfo_s, code) - 0usize];
    ["Offset of field: ZL_StaticErrorInfo_s::fmt"]
        [::std::mem::offset_of!(ZL_StaticErrorInfo_s, fmt) - 8usize];
    ["Offset of field: ZL_StaticErrorInfo_s::file"]
        [::std::mem::offset_of!(ZL_StaticErrorInfo_s, file) - 16usize];
    ["Offset of field: ZL_StaticErrorInfo_s::func"]
        [::std::mem::offset_of!(ZL_StaticErrorInfo_s, func) - 24usize];
    ["Offset of field: ZL_StaticErrorInfo_s::line"]
        [::std::mem::offset_of!(ZL_StaticErrorInfo_s, line) - 32usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_ErrorInfo_u"][::std::mem::size_of::<ZL_ErrorInfo_u>() - 8usize];
    ["Alignment of ZL_ErrorInfo_u"][::std::mem::align_of::<ZL_ErrorInfo_u>() - 8usize];
    ["Offset of field: ZL_ErrorInfo_u::_dy"][::std::mem::offset_of!(ZL_ErrorInfo_u, _dy) - 0usize];
    ["Offset of field: ZL_ErrorInfo_u::_st"][::std::mem::offset_of!(ZL_ErrorInfo_u, _st) - 0usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Error_s"][::std::mem::size_of::<ZL_Error_s>() - 16usize];
    ["Alignment of ZL_Error_s"][::std::mem::align_of::<ZL_Error_s>() - 8usize];
    ["Offset of field: ZL_Error_s::_code"][::std::mem::offset_of!(ZL_Error_s, _code) - 0usize];
    ["Offset of field: ZL_Error_s::_info"][::std::mem::offset_of!(ZL_Error_s, _info) - 8usize];
};
unsafe 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;
}
unsafe 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, ...);
}
unsafe 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 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_ERR_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(
        ctx: *const ZL_ErrorContext,
        error: ZL_Error,
        backup: ZL_ErrorInfo,
        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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Error_Array"][::std::mem::size_of::<ZL_Error_Array>() - 16usize];
    ["Alignment of ZL_Error_Array"][::std::mem::align_of::<ZL_Error_Array>() - 8usize];
    ["Offset of field: ZL_Error_Array::errors"]
        [::std::mem::offset_of!(ZL_Error_Array, errors) - 0usize];
    ["Offset of field: ZL_Error_Array::size"]
        [::std::mem::offset_of!(ZL_Error_Array, size) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Result_ZL_GraphID_inner {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_GraphID,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_GraphID_inner"]
        [::std::mem::size_of::<ZL_Result_ZL_GraphID_inner>() - 8usize];
    ["Alignment of ZL_Result_ZL_GraphID_inner"]
        [::std::mem::align_of::<ZL_Result_ZL_GraphID_inner>() - 4usize];
    ["Offset of field: ZL_Result_ZL_GraphID_inner::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_GraphID_inner, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_GraphID_inner::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_GraphID_inner, _value) - 4usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_GraphID_u"][::std::mem::size_of::<ZL_Result_ZL_GraphID_u>() - 16usize];
    ["Alignment of ZL_Result_ZL_GraphID_u"]
        [::std::mem::align_of::<ZL_Result_ZL_GraphID_u>() - 8usize];
    ["Offset of field: ZL_Result_ZL_GraphID_u::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_GraphID_u, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_GraphID_u::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_GraphID_u, _value) - 0usize];
    ["Offset of field: ZL_Result_ZL_GraphID_u::_error"]
        [::std::mem::offset_of!(ZL_Result_ZL_GraphID_u, _error) - 0usize];
};
pub type ZL_Result_ZL_GraphID = ZL_Result_ZL_GraphID_u;
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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_NodeID_inner"]
        [::std::mem::size_of::<ZL_Result_ZL_NodeID_inner>() - 8usize];
    ["Alignment of ZL_Result_ZL_NodeID_inner"]
        [::std::mem::align_of::<ZL_Result_ZL_NodeID_inner>() - 4usize];
    ["Offset of field: ZL_Result_ZL_NodeID_inner::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_NodeID_inner, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_NodeID_inner::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_NodeID_inner, _value) - 4usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_NodeID_u"][::std::mem::size_of::<ZL_Result_ZL_NodeID_u>() - 16usize];
    ["Alignment of ZL_Result_ZL_NodeID_u"]
        [::std::mem::align_of::<ZL_Result_ZL_NodeID_u>() - 8usize];
    ["Offset of field: ZL_Result_ZL_NodeID_u::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_NodeID_u, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_NodeID_u::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_NodeID_u, _value) - 0usize];
    ["Offset of field: ZL_Result_ZL_NodeID_u::_error"]
        [::std::mem::offset_of!(ZL_Result_ZL_NodeID_u, _error) - 0usize];
};
pub type ZL_Result_ZL_NodeID = ZL_Result_ZL_NodeID_u;
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_ZL_VoidPtr_inner {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_VoidPtr,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_VoidPtr_inner"]
        [::std::mem::size_of::<ZL_Result_ZL_VoidPtr_inner>() - 16usize];
    ["Alignment of ZL_Result_ZL_VoidPtr_inner"]
        [::std::mem::align_of::<ZL_Result_ZL_VoidPtr_inner>() - 8usize];
    ["Offset of field: ZL_Result_ZL_VoidPtr_inner::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_VoidPtr_inner, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_VoidPtr_inner::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_VoidPtr_inner, _value) - 8usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_Result_ZL_VoidPtr_u {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_Result_ZL_VoidPtr_inner,
    pub _error: ZL_Error,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_VoidPtr_u"][::std::mem::size_of::<ZL_Result_ZL_VoidPtr_u>() - 16usize];
    ["Alignment of ZL_Result_ZL_VoidPtr_u"]
        [::std::mem::align_of::<ZL_Result_ZL_VoidPtr_u>() - 8usize];
    ["Offset of field: ZL_Result_ZL_VoidPtr_u::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_VoidPtr_u, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_VoidPtr_u::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_VoidPtr_u, _value) - 0usize];
    ["Offset of field: ZL_Result_ZL_VoidPtr_u::_error"]
        [::std::mem::offset_of!(ZL_Result_ZL_VoidPtr_u, _error) - 0usize];
};
pub type ZL_Result_ZL_VoidPtr = ZL_Result_ZL_VoidPtr_u;
pub type ZL_Result_ZL_VoidPtr_fake_type_needs_semicolon = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Result_ZL_ConstVoidPtr_inner {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_ConstVoidPtr,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_ConstVoidPtr_inner"]
        [::std::mem::size_of::<ZL_Result_ZL_ConstVoidPtr_inner>() - 16usize];
    ["Alignment of ZL_Result_ZL_ConstVoidPtr_inner"]
        [::std::mem::align_of::<ZL_Result_ZL_ConstVoidPtr_inner>() - 8usize];
    ["Offset of field: ZL_Result_ZL_ConstVoidPtr_inner::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_ConstVoidPtr_inner, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_ConstVoidPtr_inner::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_ConstVoidPtr_inner, _value) - 8usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_Result_ZL_ConstVoidPtr_u {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_Result_ZL_ConstVoidPtr_inner,
    pub _error: ZL_Error,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_ConstVoidPtr_u"]
        [::std::mem::size_of::<ZL_Result_ZL_ConstVoidPtr_u>() - 16usize];
    ["Alignment of ZL_Result_ZL_ConstVoidPtr_u"]
        [::std::mem::align_of::<ZL_Result_ZL_ConstVoidPtr_u>() - 8usize];
    ["Offset of field: ZL_Result_ZL_ConstVoidPtr_u::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_ConstVoidPtr_u, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_ConstVoidPtr_u::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_ConstVoidPtr_u, _value) - 0usize];
    ["Offset of field: ZL_Result_ZL_ConstVoidPtr_u::_error"]
        [::std::mem::offset_of!(ZL_Result_ZL_ConstVoidPtr_u, _error) - 0usize];
};
pub type ZL_Result_ZL_ConstVoidPtr = ZL_Result_ZL_ConstVoidPtr_u;
pub type ZL_Result_ZL_ConstVoidPtr_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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_size_t_inner"][::std::mem::size_of::<ZL_Result_size_t_inner>() - 16usize];
    ["Alignment of ZL_Result_size_t_inner"]
        [::std::mem::align_of::<ZL_Result_size_t_inner>() - 8usize];
    ["Offset of field: ZL_Result_size_t_inner::_code"]
        [::std::mem::offset_of!(ZL_Result_size_t_inner, _code) - 0usize];
    ["Offset of field: ZL_Result_size_t_inner::_value"]
        [::std::mem::offset_of!(ZL_Result_size_t_inner, _value) - 8usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_size_t_u"][::std::mem::size_of::<ZL_Result_size_t_u>() - 16usize];
    ["Alignment of ZL_Result_size_t_u"][::std::mem::align_of::<ZL_Result_size_t_u>() - 8usize];
    ["Offset of field: ZL_Result_size_t_u::_code"]
        [::std::mem::offset_of!(ZL_Result_size_t_u, _code) - 0usize];
    ["Offset of field: ZL_Result_size_t_u::_value"]
        [::std::mem::offset_of!(ZL_Result_size_t_u, _value) - 0usize];
    ["Offset of field: ZL_Result_size_t_u::_error"]
        [::std::mem::offset_of!(ZL_Result_size_t_u, _error) - 0usize];
};
pub type ZL_Result_size_t = ZL_Result_size_t_u;
pub type ZL_Result_size_t_fake_type_needs_semicolon = ::std::os::raw::c_int;
pub type ZL_Report = ZL_Result_size_t;
unsafe extern "C" {
    pub fn ZL_ErrorCode_toString(code: ZL_ErrorCode) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " @returns a specific ZL_ErrorCode as a ZL_Report return type."]
    pub fn ZL_returnError(err: ZL_ErrorCode) -> ZL_Report;
}
pub const ZL_Type_ZL_Type_serial: ZL_Type = 1;
pub const ZL_Type_ZL_Type_struct: ZL_Type = 2;
pub const ZL_Type_ZL_Type_numeric: ZL_Type = 4;
pub const ZL_Type_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_ZL_DataArenaType_heap: ZL_DataArenaType = 0;
pub const ZL_DataArenaType_ZL_DataArenaType_stack: ZL_DataArenaType = 1;
pub type ZL_DataArenaType = ::std::os::raw::c_uint;
unsafe extern "C" {
    pub fn ZL_Data_id(in_: *const ZL_Data) -> ZL_DataID;
}
unsafe extern "C" {
    pub fn ZL_Data_type(data: *const ZL_Data) -> ZL_Type;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
    pub fn ZL_Data_wPtr(data: *mut ZL_Data) -> *mut ::std::os::raw::c_void;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_IntMetadata"][::std::mem::size_of::<ZL_IntMetadata>() - 8usize];
    ["Alignment of ZL_IntMetadata"][::std::mem::align_of::<ZL_IntMetadata>() - 4usize];
    ["Offset of field: ZL_IntMetadata::isPresent"]
        [::std::mem::offset_of!(ZL_IntMetadata, isPresent) - 0usize];
    ["Offset of field: ZL_IntMetadata::mValue"]
        [::std::mem::offset_of!(ZL_IntMetadata, mValue) - 4usize];
};
unsafe 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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_IntParam"][::std::mem::size_of::<ZL_IntParam>() - 8usize];
    ["Alignment of ZL_IntParam"][::std::mem::align_of::<ZL_IntParam>() - 4usize];
    ["Offset of field: ZL_IntParam::paramId"]
        [::std::mem::offset_of!(ZL_IntParam, paramId) - 0usize];
    ["Offset of field: ZL_IntParam::paramValue"]
        [::std::mem::offset_of!(ZL_IntParam, paramValue) - 4usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_LocalIntParams {
    pub intParams: *const ZL_IntParam,
    pub nbIntParams: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_LocalIntParams"][::std::mem::size_of::<ZL_LocalIntParams>() - 16usize];
    ["Alignment of ZL_LocalIntParams"][::std::mem::align_of::<ZL_LocalIntParams>() - 8usize];
    ["Offset of field: ZL_LocalIntParams::intParams"]
        [::std::mem::offset_of!(ZL_LocalIntParams, intParams) - 0usize];
    ["Offset of field: ZL_LocalIntParams::nbIntParams"]
        [::std::mem::offset_of!(ZL_LocalIntParams, nbIntParams) - 8usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_CopyParam"][::std::mem::size_of::<ZL_CopyParam>() - 24usize];
    ["Alignment of ZL_CopyParam"][::std::mem::align_of::<ZL_CopyParam>() - 8usize];
    ["Offset of field: ZL_CopyParam::paramId"]
        [::std::mem::offset_of!(ZL_CopyParam, paramId) - 0usize];
    ["Offset of field: ZL_CopyParam::paramPtr"]
        [::std::mem::offset_of!(ZL_CopyParam, paramPtr) - 8usize];
    ["Offset of field: ZL_CopyParam::paramSize"]
        [::std::mem::offset_of!(ZL_CopyParam, paramSize) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_LocalCopyParams {
    pub copyParams: *const ZL_CopyParam,
    pub nbCopyParams: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_LocalCopyParams"][::std::mem::size_of::<ZL_LocalCopyParams>() - 16usize];
    ["Alignment of ZL_LocalCopyParams"][::std::mem::align_of::<ZL_LocalCopyParams>() - 8usize];
    ["Offset of field: ZL_LocalCopyParams::copyParams"]
        [::std::mem::offset_of!(ZL_LocalCopyParams, copyParams) - 0usize];
    ["Offset of field: ZL_LocalCopyParams::nbCopyParams"]
        [::std::mem::offset_of!(ZL_LocalCopyParams, nbCopyParams) - 8usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_RefParam"][::std::mem::size_of::<ZL_RefParam>() - 24usize];
    ["Alignment of ZL_RefParam"][::std::mem::align_of::<ZL_RefParam>() - 8usize];
    ["Offset of field: ZL_RefParam::paramId"]
        [::std::mem::offset_of!(ZL_RefParam, paramId) - 0usize];
    ["Offset of field: ZL_RefParam::paramRef"]
        [::std::mem::offset_of!(ZL_RefParam, paramRef) - 8usize];
    ["Offset of field: ZL_RefParam::paramSize"]
        [::std::mem::offset_of!(ZL_RefParam, paramSize) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_LocalRefParams {
    pub refParams: *const ZL_RefParam,
    pub nbRefParams: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_LocalRefParams"][::std::mem::size_of::<ZL_LocalRefParams>() - 16usize];
    ["Alignment of ZL_LocalRefParams"][::std::mem::align_of::<ZL_LocalRefParams>() - 8usize];
    ["Offset of field: ZL_LocalRefParams::refParams"]
        [::std::mem::offset_of!(ZL_LocalRefParams, refParams) - 0usize];
    ["Offset of field: ZL_LocalRefParams::nbRefParams"]
        [::std::mem::offset_of!(ZL_LocalRefParams, nbRefParams) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_LocalParams {
    pub intParams: ZL_LocalIntParams,
    pub copyParams: ZL_LocalCopyParams,
    pub refParams: ZL_LocalRefParams,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_LocalParams"][::std::mem::size_of::<ZL_LocalParams>() - 48usize];
    ["Alignment of ZL_LocalParams"][::std::mem::align_of::<ZL_LocalParams>() - 8usize];
    ["Offset of field: ZL_LocalParams::intParams"]
        [::std::mem::offset_of!(ZL_LocalParams, intParams) - 0usize];
    ["Offset of field: ZL_LocalParams::copyParams"]
        [::std::mem::offset_of!(ZL_LocalParams, copyParams) - 16usize];
    ["Offset of field: ZL_LocalParams::refParams"]
        [::std::mem::offset_of!(ZL_LocalParams, refParams) - 32usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_CompressIntrospectionHooks_s {
    pub opaque: *mut ::std::os::raw::c_void,
    pub on_segmenterEncode_start: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            segCtx: *mut ZL_Segmenter,
            placeholder: *mut ::std::os::raw::c_void,
        ),
    >,
    pub on_segmenterEncode_end: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            segCtx: *mut ZL_Segmenter,
            r: ZL_Report,
        ),
    >,
    pub on_ZL_Segmenter_processChunk_start: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            segCtx: *mut ZL_Segmenter,
            numElts: *const usize,
            numInputs: usize,
            startingGraphID: ZL_GraphID,
            rGraphParams: *const ZL_RuntimeGraphParameters,
        ),
    >,
    pub on_ZL_Segmenter_processChunk_end: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            segCtx: *mut ZL_Segmenter,
            r: ZL_Report,
        ),
    >,
    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: *mut 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,
        ),
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_CompressIntrospectionHooks_s"]
        [::std::mem::size_of::<ZL_CompressIntrospectionHooks_s>() - 136usize];
    ["Alignment of ZL_CompressIntrospectionHooks_s"]
        [::std::mem::align_of::<ZL_CompressIntrospectionHooks_s>() - 8usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::opaque"]
        [::std::mem::offset_of!(ZL_CompressIntrospectionHooks_s, opaque) - 0usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_segmenterEncode_start"][::std::mem::offset_of!(
        ZL_CompressIntrospectionHooks_s,
        on_segmenterEncode_start
    ) - 8usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_segmenterEncode_end"]
        [::std::mem::offset_of!(ZL_CompressIntrospectionHooks_s, on_segmenterEncode_end) - 16usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Segmenter_processChunk_start"][::std::mem::offset_of!(
        ZL_CompressIntrospectionHooks_s,
        on_ZL_Segmenter_processChunk_start
    )
        - 24usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Segmenter_processChunk_end"][::std::mem::offset_of!(
        ZL_CompressIntrospectionHooks_s,
        on_ZL_Segmenter_processChunk_end
    )
        - 32usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Encoder_getScratchSpace"][::std::mem::offset_of!(
        ZL_CompressIntrospectionHooks_s,
        on_ZL_Encoder_getScratchSpace
    )
        - 40usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Encoder_sendCodecHeader"][::std::mem::offset_of!(
        ZL_CompressIntrospectionHooks_s,
        on_ZL_Encoder_sendCodecHeader
    )
        - 48usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Encoder_createTypedStream"][::std::mem::offset_of!(
        ZL_CompressIntrospectionHooks_s,
        on_ZL_Encoder_createTypedStream
    )
        - 56usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Graph_getScratchSpace"][::std::mem::offset_of!(
        ZL_CompressIntrospectionHooks_s,
        on_ZL_Graph_getScratchSpace
    ) - 64usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_Edge_setMultiInputDestination_wParams"] [:: std :: mem :: offset_of ! (ZL_CompressIntrospectionHooks_s , on_ZL_Edge_setMultiInputDestination_wParams) - 72usize] ;
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_migraphEncode_start"]
        [::std::mem::offset_of!(ZL_CompressIntrospectionHooks_s, on_migraphEncode_start) - 80usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_migraphEncode_end"]
        [::std::mem::offset_of!(ZL_CompressIntrospectionHooks_s, on_migraphEncode_end) - 88usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_codecEncode_start"]
        [::std::mem::offset_of!(ZL_CompressIntrospectionHooks_s, on_codecEncode_start) - 96usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_codecEncode_end"]
        [::std::mem::offset_of!(ZL_CompressIntrospectionHooks_s, on_codecEncode_end) - 104usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_cctx_convertOneInput"][::std::mem::offset_of!(
        ZL_CompressIntrospectionHooks_s,
        on_cctx_convertOneInput
    ) - 112usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_CCtx_compressMultiTypedRef_start"][::std::mem::offset_of!(
        ZL_CompressIntrospectionHooks_s,
        on_ZL_CCtx_compressMultiTypedRef_start
    )
        - 120usize];
    ["Offset of field: ZL_CompressIntrospectionHooks_s::on_ZL_CCtx_compressMultiTypedRef_end"][::std::mem::offset_of!(
        ZL_CompressIntrospectionHooks_s,
        on_ZL_CCtx_compressMultiTypedRef_end
    )
        - 128usize];
};
pub type ZL_CompressIntrospectionHooks = ZL_CompressIntrospectionHooks_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_DecompressIntrospectionHooks_s {
    pub opaque: *mut ::std::os::raw::c_void,
    pub on_ZL_DCtx_decompressMultiTBuffer_start: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            dctx: *mut ZL_DCtx,
            nbOutputs: usize,
            framePtr: *const ::std::os::raw::c_void,
            frameSize: usize,
        ),
    >,
    pub on_ZL_DCtx_decompressMultiTBuffer_end: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            dctx: *mut ZL_DCtx,
            result: ZL_Report,
        ),
    >,
    pub on_decompressChunk_start: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            dctx: *mut ZL_DCtx,
            chunkIndex: usize,
        ),
    >,
    pub on_decompressChunk_end: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            dctx: *mut ZL_DCtx,
            result: ZL_Report,
        ),
    >,
    pub on_ZL_Decoder_getCodecHeader: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            dictx: *const ZL_Decoder,
            trh: *const ::std::os::raw::c_void,
            trhSize: usize,
        ),
    >,
    pub on_codecDecode_start: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            dictx: *mut ZL_Decoder,
            inStreams: *const *const ZL_Data,
            nbInStreams: usize,
        ),
    >,
    pub on_codecDecode_end: ::std::option::Option<
        unsafe extern "C" fn(
            opaque: *mut ::std::os::raw::c_void,
            dictx: *mut ZL_Decoder,
            outStreams: *const *const ZL_Data,
            nbOutStreams: usize,
            result: ZL_Report,
        ),
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_DecompressIntrospectionHooks_s"]
        [::std::mem::size_of::<ZL_DecompressIntrospectionHooks_s>() - 64usize];
    ["Alignment of ZL_DecompressIntrospectionHooks_s"]
        [::std::mem::align_of::<ZL_DecompressIntrospectionHooks_s>() - 8usize];
    ["Offset of field: ZL_DecompressIntrospectionHooks_s::opaque"]
        [::std::mem::offset_of!(ZL_DecompressIntrospectionHooks_s, opaque) - 0usize];
    ["Offset of field: ZL_DecompressIntrospectionHooks_s::on_ZL_DCtx_decompressMultiTBuffer_start"] [:: std :: mem :: offset_of ! (ZL_DecompressIntrospectionHooks_s , on_ZL_DCtx_decompressMultiTBuffer_start) - 8usize] ;
    ["Offset of field: ZL_DecompressIntrospectionHooks_s::on_ZL_DCtx_decompressMultiTBuffer_end"][::std::mem::offset_of!(
        ZL_DecompressIntrospectionHooks_s,
        on_ZL_DCtx_decompressMultiTBuffer_end
    )
        - 16usize];
    ["Offset of field: ZL_DecompressIntrospectionHooks_s::on_decompressChunk_start"][::std::mem::offset_of!(
        ZL_DecompressIntrospectionHooks_s,
        on_decompressChunk_start
    ) - 24usize];
    ["Offset of field: ZL_DecompressIntrospectionHooks_s::on_decompressChunk_end"][::std::mem::offset_of!(
        ZL_DecompressIntrospectionHooks_s,
        on_decompressChunk_end
    ) - 32usize];
    ["Offset of field: ZL_DecompressIntrospectionHooks_s::on_ZL_Decoder_getCodecHeader"][::std::mem::offset_of!(
        ZL_DecompressIntrospectionHooks_s,
        on_ZL_Decoder_getCodecHeader
    )
        - 40usize];
    ["Offset of field: ZL_DecompressIntrospectionHooks_s::on_codecDecode_start"]
        [::std::mem::offset_of!(ZL_DecompressIntrospectionHooks_s, on_codecDecode_start) - 48usize];
    ["Offset of field: ZL_DecompressIntrospectionHooks_s::on_codecDecode_end"]
        [::std::mem::offset_of!(ZL_DecompressIntrospectionHooks_s, on_codecDecode_end) - 56usize];
};
pub type ZL_DecompressIntrospectionHooks = ZL_DecompressIntrospectionHooks_s;
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
    pub fn ZL_CCtx_create() -> *mut ZL_CCtx;
}
unsafe 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_ZL_CParam_stickyParameters: ZL_CParam = 1;
#[doc = " Scale amplitude to determine"]
pub const ZL_CParam_ZL_CParam_compressionLevel: ZL_CParam = 2;
#[doc = " Scale amplitude to determine"]
pub const ZL_CParam_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_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_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_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_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_ZL_CParam_minStreamSize: ZL_CParam = 11;
#[doc = " Controls whether chunks that expand during compression\n are automatically replaced with STORE (anti-inflation guard).\n Valid values for this parameter use the ZS2_cv3_* format.\n @default 0 currently means enabled, preserving existing behavior."]
pub const ZL_CParam_ZL_CParam_storeOnExpansion: ZL_CParam = 12;
#[doc = " The list of global compression parameters"]
pub type ZL_CParam = ::std::os::raw::c_uint;
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
    #[doc = " Detach any introspection hooks currently attached to the CCtx."]
    pub fn ZL_CCtx_detachAllIntrospectionHooks(cctx: *mut ZL_CCtx) -> ZL_Report;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
    #[doc = " Adds header comment to the compressed frame for the following compression.\n The message will be overridden if added a second time. The message is erased\n from the cctx at the end of each compression.\n\n @note A comment of size 0 clears the comment field.\n\n @param comment The comment to add. The comment is copied and stored in the\n cctx.\n @param commentSize The size of the comment or 0 to clear the comment."]
    pub fn ZL_CCtx_addHeaderComment(
        cctx: *mut ZL_CCtx,
        comment: *const ::std::os::raw::c_void,
        commentSize: usize,
    ) -> ZL_Report;
}
unsafe 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);
}
unsafe 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;
}
unsafe 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;
}
unsafe 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\n committed, it returns an error."]
    pub fn ZL_Output_contentSize(output: *const ZL_Output) -> ZL_Report;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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);
}
unsafe extern "C" {
    #[doc = " @brief Attach a dict loader to the decompression context.\n\n The dict loader is referenced (not owned) by the DCtx. The caller must\n ensure the dict loader outlives the DCtx."]
    pub fn ZL_DCtx_refDictLoader(dctx: *mut ZL_DCtx, loader: *mut ZL_DictLoader);
}
#[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_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_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_ZL_DParam_checkContentChecksum: ZL_DParam = 3;
#[doc = " @brief Enable codec fusion during decompression.\n\n Codec fusion combines multiple adjacent codec nodes into a single\n optimized decoder. Setting this to ZL_TernaryParam_disable causes each\n codec in the graph to be decoded individually, which can be useful for\n debugging or testing codec correctness without fusion.\n\n Valid values use the ZL_TernaryParam format defaulting to enabled."]
pub const ZL_DParam_ZL_DParam_enableCodecFusion: ZL_DParam = 4;
#[doc = " @brief Global decompression parameters."]
pub type ZL_DParam = ::std::os::raw::c_uint;
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
    pub fn ZL_DCtx_setStreamArena(dctx: *mut ZL_DCtx, sat: ZL_DataArenaType) -> ZL_Report;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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],
}
unsafe 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;
}
unsafe 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);
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Result_ZL_Comment_inner {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_Comment,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_Comment_inner"]
        [::std::mem::size_of::<ZL_Result_ZL_Comment_inner>() - 24usize];
    ["Alignment of ZL_Result_ZL_Comment_inner"]
        [::std::mem::align_of::<ZL_Result_ZL_Comment_inner>() - 8usize];
    ["Offset of field: ZL_Result_ZL_Comment_inner::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_Comment_inner, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_Comment_inner::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_Comment_inner, _value) - 8usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_Result_ZL_Comment_u {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_Result_ZL_Comment_inner,
    pub _error: ZL_Error,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_Comment_u"][::std::mem::size_of::<ZL_Result_ZL_Comment_u>() - 24usize];
    ["Alignment of ZL_Result_ZL_Comment_u"]
        [::std::mem::align_of::<ZL_Result_ZL_Comment_u>() - 8usize];
    ["Offset of field: ZL_Result_ZL_Comment_u::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_Comment_u, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_Comment_u::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_Comment_u, _value) - 0usize];
    ["Offset of field: ZL_Result_ZL_Comment_u::_error"]
        [::std::mem::offset_of!(ZL_Result_ZL_Comment_u, _error) - 0usize];
};
pub type ZL_Result_ZL_Comment = ZL_Result_ZL_Comment_u;
pub type ZL_Result_ZL_Comment_fake_type_needs_semicolon = ::std::os::raw::c_int;
unsafe extern "C" {
    #[doc = " @brief Gets the comment stored in the FrameInfo.\n\n @returns The comment or an error. If no comment is present it\n returns a comment with `size == 0`. The buffer returned is owned by @p zfi"]
    pub fn ZL_FrameInfo_getComment(zfi: *const ZL_FrameInfo) -> ZL_Result_ZL_Comment;
}
unsafe extern "C" {
    #[doc = " @brief Gets the dict bundle ID referenced by the frame, if any.\n\n @returns A pointer to the bundle ID stored in @p zfi, or NULL if the frame\n does not reference a dict bundle."]
    pub fn ZL_FrameInfo_getBundleID(zfi: *const ZL_FrameInfo) -> *const ZL_BundleID;
}
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_OutputInfo"][::std::mem::size_of::<ZL_OutputInfo>() - 24usize];
    ["Alignment of ZL_OutputInfo"][::std::mem::align_of::<ZL_OutputInfo>() - 8usize];
    ["Offset of field: ZL_OutputInfo::type_"]
        [::std::mem::offset_of!(ZL_OutputInfo, type_) - 0usize];
    ["Offset of field: ZL_OutputInfo::fixedWidth"]
        [::std::mem::offset_of!(ZL_OutputInfo, fixedWidth) - 4usize];
    ["Offset of field: ZL_OutputInfo::decompressedByteSize"]
        [::std::mem::offset_of!(ZL_OutputInfo, decompressedByteSize) - 8usize];
    ["Offset of field: ZL_OutputInfo::numElts"]
        [::std::mem::offset_of!(ZL_OutputInfo, numElts) - 16usize];
};
unsafe 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;
unsafe 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;
}
unsafe 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);
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
    #[doc = " Attach introspection hooks to the DCtx. Hooks allow code to run at specific\n DWAYPOINTs during decompression. A hook set to NULL will simply be skipped.\n There can only be one set of hooks attached at a time; calling this again\n will overwrite the previous hooks. The caller is responsible for maintaining\n the lifetime of the objects referenced by the hooks.\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_DCtx_attachDecompressIntrospectionHooks(
        dctx: *mut ZL_DCtx,
        hooks: *const ZL_DecompressIntrospectionHooks,
    ) -> ZL_Report;
}
unsafe extern "C" {
    #[doc = " Detach any decompression introspection hooks currently attached to the DCtx."]
    pub fn ZL_DCtx_detachAllDecompressIntrospectionHooks(dctx: *mut ZL_DCtx) -> ZL_Report;
}
unsafe 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;
}
unsafe extern "C" {
    #[doc = " @see ZL_Compressor_buildACEGraph"]
    pub fn ZL_Compressor_buildACEGraph2(compressor: *mut ZL_Compressor) -> ZL_Result_ZL_GraphID;
}
unsafe 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;
}
unsafe 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_ZL_StandardGraphID_illegal: ZL_StandardGraphID = 0;
pub const ZL_StandardGraphID_ZL_StandardGraphID_store: ZL_StandardGraphID = 2;
pub const ZL_StandardGraphID_ZL_StandardGraphID_fse: ZL_StandardGraphID = 3;
pub const ZL_StandardGraphID_ZL_StandardGraphID_huffman: ZL_StandardGraphID = 4;
pub const ZL_StandardGraphID_ZL_StandardGraphID_entropy: ZL_StandardGraphID = 5;
pub const ZL_StandardGraphID_ZL_StandardGraphID_constant: ZL_StandardGraphID = 6;
pub const ZL_StandardGraphID_ZL_StandardGraphID_zstd: ZL_StandardGraphID = 7;
pub const ZL_StandardGraphID_ZL_StandardGraphID_bitpack: ZL_StandardGraphID = 8;
pub const ZL_StandardGraphID_ZL_StandardGraphID_flatpack: ZL_StandardGraphID = 9;
pub const ZL_StandardGraphID_ZL_StandardGraphID_field_lz: ZL_StandardGraphID = 10;
pub const ZL_StandardGraphID_ZL_StandardGraphID_compress_generic: ZL_StandardGraphID = 11;
pub const ZL_StandardGraphID_ZL_StandardGraphID_select_generic_lz_backend: ZL_StandardGraphID = 12;
pub const ZL_StandardGraphID_ZL_StandardGraphID_segment_numeric: ZL_StandardGraphID = 13;
pub const ZL_StandardGraphID_ZL_StandardGraphID_select_numeric: ZL_StandardGraphID = 14;
pub const ZL_StandardGraphID_ZL_StandardGraphID_ml_selector: ZL_StandardGraphID = 15;
pub const ZL_StandardGraphID_ZL_StandardGraphID_clustering: ZL_StandardGraphID = 16;
pub const ZL_StandardGraphID_ZL_StandardGraphID_try_parse_int: ZL_StandardGraphID = 17;
pub const ZL_StandardGraphID_ZL_StandardGraphID_simple_data_description_language:
    ZL_StandardGraphID = 18;
pub const ZL_StandardGraphID_ZL_StandardGraphID_simple_data_description_language_v2:
    ZL_StandardGraphID = 19;
pub const ZL_StandardGraphID_ZL_StandardGraphID_lz4: ZL_StandardGraphID = 20;
pub const ZL_StandardGraphID_ZL_StandardGraphID_partition_bitpack: ZL_StandardGraphID = 21;
pub const ZL_StandardGraphID_ZL_StandardGraphID_segment_num8_from_serial: ZL_StandardGraphID = 22;
pub const ZL_StandardGraphID_ZL_StandardGraphID_segment_num16_from_serial: ZL_StandardGraphID = 23;
pub const ZL_StandardGraphID_ZL_StandardGraphID_segment_num32_from_serial: ZL_StandardGraphID = 24;
pub const ZL_StandardGraphID_ZL_StandardGraphID_segment_num64_from_serial: ZL_StandardGraphID = 25;
pub const ZL_StandardGraphID_ZL_StandardGraphID_lz: ZL_StandardGraphID = 26;
pub const ZL_StandardGraphID_ZL_StandardGraphID_segment_serial: ZL_StandardGraphID = 27;
pub const ZL_StandardGraphID_ZL_StandardGraphID_public_end: ZL_StandardGraphID = 28;
pub type ZL_StandardGraphID = ::std::os::raw::c_uint;
pub const ZL_StandardNodeID_ZL_StandardNodeID_illegal: ZL_StandardNodeID = 0;
pub const ZL_StandardNodeID_ZL_StandardNodeID_delta_int: ZL_StandardNodeID = 2;
pub const ZL_StandardNodeID_ZL_StandardNodeID_transpose_split: ZL_StandardNodeID = 3;
pub const ZL_StandardNodeID_ZL_StandardNodeID_zigzag: ZL_StandardNodeID = 4;
pub const ZL_StandardNodeID_ZL_StandardNodeID_dispatchN_byTag: ZL_StandardNodeID = 5;
pub const ZL_StandardNodeID_ZL_StandardNodeID_float32_deconstruct: ZL_StandardNodeID = 6;
pub const ZL_StandardNodeID_ZL_StandardNodeID_bfloat16_deconstruct: ZL_StandardNodeID = 7;
pub const ZL_StandardNodeID_ZL_StandardNodeID_float16_deconstruct: ZL_StandardNodeID = 8;
pub const ZL_StandardNodeID_ZL_StandardNodeID_field_lz: ZL_StandardNodeID = 9;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_struct_to_serial: ZL_StandardNodeID = 10;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_num_to_struct_le: ZL_StandardNodeID = 11;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_num_to_serial_le: ZL_StandardNodeID = 12;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_serial_to_struct: ZL_StandardNodeID = 13;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_serial_to_struct2: ZL_StandardNodeID = 14;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_serial_to_struct4: ZL_StandardNodeID = 15;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_serial_to_struct8: ZL_StandardNodeID = 16;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_struct_to_num_le: ZL_StandardNodeID = 17;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_struct_to_num_be: ZL_StandardNodeID = 18;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_serial_to_num8: ZL_StandardNodeID = 19;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_serial_to_num_le16: ZL_StandardNodeID = 20;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_serial_to_num_le32: ZL_StandardNodeID = 21;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_serial_to_num_le64: ZL_StandardNodeID = 22;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_serial_to_num_be16: ZL_StandardNodeID = 23;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_serial_to_num_be32: ZL_StandardNodeID = 24;
pub const ZL_StandardNodeID_ZL_StandardNodeID_convert_serial_to_num_be64: ZL_StandardNodeID = 25;
pub const ZL_StandardNodeID_ZL_StandardNodeID_separate_string_components: ZL_StandardNodeID = 26;
pub const ZL_StandardNodeID_ZL_StandardNodeID_bitunpack: ZL_StandardNodeID = 27;
pub const ZL_StandardNodeID_ZL_StandardNodeID_range_pack: ZL_StandardNodeID = 28;
pub const ZL_StandardNodeID_ZL_StandardNodeID_merge_sorted: ZL_StandardNodeID = 29;
pub const ZL_StandardNodeID_ZL_StandardNodeID_prefix: ZL_StandardNodeID = 30;
pub const ZL_StandardNodeID_ZL_StandardNodeID_divide_by: ZL_StandardNodeID = 31;
pub const ZL_StandardNodeID_ZL_StandardNodeID_dispatch_string: ZL_StandardNodeID = 32;
pub const ZL_StandardNodeID_ZL_StandardNodeID_concat_serial: ZL_StandardNodeID = 33;
pub const ZL_StandardNodeID_ZL_StandardNodeID_concat_num: ZL_StandardNodeID = 34;
pub const ZL_StandardNodeID_ZL_StandardNodeID_concat_struct: ZL_StandardNodeID = 35;
pub const ZL_StandardNodeID_ZL_StandardNodeID_concat_string: ZL_StandardNodeID = 36;
pub const ZL_StandardNodeID_ZL_StandardNodeID_dedup_num: ZL_StandardNodeID = 37;
pub const ZL_StandardNodeID_ZL_StandardNodeID_parse_int: ZL_StandardNodeID = 38;
pub const ZL_StandardNodeID_ZL_StandardNodeID_interleave_string: ZL_StandardNodeID = 39;
pub const ZL_StandardNodeID_ZL_StandardNodeID_tokenize_struct: ZL_StandardNodeID = 40;
pub const ZL_StandardNodeID_ZL_StandardNodeID_tokenize_numeric: ZL_StandardNodeID = 41;
pub const ZL_StandardNodeID_ZL_StandardNodeID_tokenize_string: ZL_StandardNodeID = 42;
pub const ZL_StandardNodeID_ZL_StandardNodeID_quantize_offsets: ZL_StandardNodeID = 43;
pub const ZL_StandardNodeID_ZL_StandardNodeID_quantize_lengths: ZL_StandardNodeID = 44;
pub const ZL_StandardNodeID_ZL_StandardNodeID_bitsplit_top8: ZL_StandardNodeID = 45;
pub const ZL_StandardNodeID_ZL_StandardNodeID_bitsplit_fp: ZL_StandardNodeID = 46;
pub const ZL_StandardNodeID_ZL_StandardNodeID_bitsplit_bf16: ZL_StandardNodeID = 47;
pub const ZL_StandardNodeID_ZL_StandardNodeID_partition: ZL_StandardNodeID = 48;
pub const ZL_StandardNodeID_ZL_StandardNodeID_split_byrange: ZL_StandardNodeID = 49;
pub const ZL_StandardNodeID_ZL_StandardNodeID_sentinel_byte: ZL_StandardNodeID = 50;
pub const ZL_StandardNodeID_ZL_StandardNodeID_sentinel_num: ZL_StandardNodeID = 51;
pub const ZL_StandardNodeID_ZL_StandardNodeID_lz: ZL_StandardNodeID = 52;
pub const ZL_StandardNodeID_ZL_StandardNodeID_mux_lengths: ZL_StandardNodeID = 53;
pub const ZL_StandardNodeID_ZL_StandardNodeID_public_end: ZL_StandardNodeID = 54;
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;
unsafe extern "C" {
    pub fn ZL_Compressor_registerBitunpackNode(
        cgraph: *mut ZL_Compressor,
        nbBits: ::std::os::raw::c_int,
    ) -> ZL_NodeID;
}
unsafe 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;
}
#[doc = " @brief Descriptor for materializing and dematerializing local params\n\n This structure defines functions to materialize an in-memory object from\n local parameters and to dematerialize (free) that object.\n\n Materialized objects are available as a @ref ZL_RefParam via the typical\n local params access methods. Specify the retrieval key with the paramId\n field."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_MaterializerDesc_s {
    #[doc = " @brief A custom function that materializes an in-memory object from a\n provided @p params object.\n\n This function may arbitrarily use none, any, or all of the provided\n local params to generate the materialized object, but the generation\n MUST be deterministic and hermetic. In particular, materialization shall\n not depend on variables other than the provided @ref ZL_LocalParams\n object.\n\n Materialized object lifetimes will be managed by the @ref ZL_Compressor\n on which the node is registered/parameterized. Objects will be\n materialized around the time of node registration/parameterization and\n will remain allocated for the lifetime of the associated @ref\n ZL_Compressor.\n\n Do NOT rely on the materialization function being called at any specific\n time to do side-effect work. Doing so will result in undefined behavior.\n\n The @ref ZL_Compressor may arbitrarily share the same materialized object\n between multiple nodes with the same @p params and the @ref ZL_CCtx may\n provide concurrent access to materialized objects. DO NOT attempt to\n modify the materialized object after creation, either directly or via API\n getters.\n\n @param matCtx A pointer to a materializer context object associated with\n the @ref ZL_Compressor. The materialization function may use this to\n request managed memory from the ZL_Compressor as an alternative to\n managing allocations itself and via the dematerializeFn.\n @param params  A pointer to the local params object to materialize. The\n provided params have no lifetime guarantees past the invocation of this\n function. You may not hold references into the params object in the\n materialized object.\n\n @returns A ZL_RESULT containing a pointer to the materialized object on\n success, or an error. Returning NULL as a valid result (when there's\n nothing to materialize) should be wrapped in ZL_WRAP_VALUE(NULL). Ensure\n the function declares a result scope with ZL_RESULT_DECLARE_SCOPE or you\n will get a compiler error."]
    pub materializeFn: ::std::option::Option<
        unsafe extern "C" fn(
            matCtx: *mut ZL_Materializer,
            params: *const ZL_LocalParams,
        ) -> ZL_Result_ZL_VoidPtr,
    >,
    #[doc = " @brief A custom function that destructs a materialized object.\n\n You should use this to deallocate all non-arena memory and free any held\n resources. As a convenience, if there are no resources or memory to free,\n you may use ZL_NOOP_DEMATERIALIZE as a placeholder."]
    pub dematerializeFn: ::std::option::Option<
        unsafe extern "C" fn(
            matCtx: *mut ZL_Materializer,
            materialized: *mut ::std::os::raw::c_void,
        ),
    >,
    #[doc = " The paramId to use for the materialized param. If there is an existing\n param that uses this paramId, the registration will fail."]
    pub paramId: ::std::os::raw::c_int,
    #[doc = " Optionally an opaque pointer that can be queried with\n ZL_Materializer_getOpaquePtr(). OpenZL does not take ownership of this\n pointer. If lifetime extension is needed, it should be managed by the\n `ZL_OpaquePtr` in the outer `ZL_MIEncoderDesc`."]
    pub opaque: *const ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_MaterializerDesc_s"][::std::mem::size_of::<ZL_MaterializerDesc_s>() - 32usize];
    ["Alignment of ZL_MaterializerDesc_s"]
        [::std::mem::align_of::<ZL_MaterializerDesc_s>() - 8usize];
    ["Offset of field: ZL_MaterializerDesc_s::materializeFn"]
        [::std::mem::offset_of!(ZL_MaterializerDesc_s, materializeFn) - 0usize];
    ["Offset of field: ZL_MaterializerDesc_s::dematerializeFn"]
        [::std::mem::offset_of!(ZL_MaterializerDesc_s, dematerializeFn) - 8usize];
    ["Offset of field: ZL_MaterializerDesc_s::paramId"]
        [::std::mem::offset_of!(ZL_MaterializerDesc_s, paramId) - 16usize];
    ["Offset of field: ZL_MaterializerDesc_s::opaque"]
        [::std::mem::offset_of!(ZL_MaterializerDesc_s, opaque) - 24usize];
};
#[doc = " @brief Descriptor for materializing and dematerializing local params\n\n This structure defines functions to materialize an in-memory object from\n local parameters and to dematerialize (free) that object.\n\n Materialized objects are available as a @ref ZL_RefParam via the typical\n local params access methods. Specify the retrieval key with the paramId\n field."]
pub type ZL_MaterializerDesc = ZL_MaterializerDesc_s;
unsafe extern "C" {
    #[doc = " No-op dematerialization function.\n Use this as a placeholder when there are no resources or memory to free."]
    pub fn ZL_NOOP_DEMATERIALIZE(
        matCtx: *mut ZL_Materializer,
        materialized: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    #[doc = " Managed space allocation (Materializers ONLY):\n Materialization may request arena space to hold materialized objects. It is\n allowed to request multiple buffers of any size. Returned buffers are not\n initialized, and cannot be freed individually. All buffers are\n automatically released at end of the owning @ref ZL_Compressor's lifetime.\n\n @note Always returns NULL during dematerialization."]
    pub fn ZL_Materializer_allocate(
        matCtx: *mut ZL_Materializer,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    #[doc = " Scratch space allocation (Materializers ONLY):\n When the materializer needs some buffer space for some local operation,\n it can request such space from the engine. It is allowed to\n request multiple buffers of any size. Returned buffers are not\n initialized, and cannot be freed individually. All scratch buffers are\n automatically released at the end of the materializer's execution.\n\n @note Always returns NULL during dematerialization."]
    pub fn ZL_Materializer_getScratchSpace(
        matCtx: *mut ZL_Materializer,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
#[doc = " @brief Descriptor for materializing and dematerializing resource objects\n (dicts and MParams).\n\n Defines functions to create an in-memory object from a raw source buffer\n (materializeFn) and to free that object (dematerializeFn). Used for both\n dictionary objects (required at compression and decompression) and MParam\n objects (compression-only). Note that the registration APIs allow for\n different materializers for compression-time and decompression-time dict\n materialization."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_MaterializerDesc2 {
    #[doc = " @brief A custom function that materializes an in-memory object from a\n provided @p src buffer. Separate function interfaces are provided for\n compression-time and decompression-time materialization. These can be the\n same function or different functions, depending on the specific codec\n implementation.\n\n The generation MUST be deterministic and hermetic. Materialization shall\n not depend on variables other than the provided @p src buffer.\n\n Materialized object lifetimes will be managed by the @ref ZL_DictLoader\n or @ref ZL_Compressor on which the materialization scheme is registered.\n\n Do NOT rely on the materialization function being called at any specific\n time to do side-effect work. Doing so will result in undefined behavior.\n\n DO NOT attempt to modify the materialized object after creation, either\n directly or via API getters.\n\n @param matCtx A pointer to a materializer context object. The\n materialization function may use this to request managed memory as an\n alternative to managing allocations itself and via the dematerializeFn.\n @param src  A pointer to the buffer from which to materialize. The\n provided buffer has no lifetime guarantees past the invocation of this\n function. You may not hold references into @p src in the materialized\n object.\n\n @returns A ZL_RESULT containing a pointer to the materialized object on\n success, or an error. Returning NULL as a valid result (when there's\n nothing to materialize) should be wrapped in ZL_WRAP_VALUE(NULL). Ensure\n the function declares a result scope with ZL_RESULT_DECLARE_SCOPE or you\n will get a compiler error."]
    pub materializeFn: ::std::option::Option<
        unsafe extern "C" fn(
            matCtx: *mut ZL_Materializer,
            src: *const ::std::os::raw::c_void,
            srcSize: usize,
        ) -> ZL_Result_ZL_VoidPtr,
    >,
    #[doc = " @brief A custom function that destructs a materialized object.\n\n You should use this to deallocate all non-arena memory and free any held\n resources. As a convenience, if there are no resources or memory to free,\n you may use ZL_NOOP_DEMATERIALIZE as a placeholder."]
    pub dematerializeFn: ::std::option::Option<
        unsafe extern "C" fn(
            matCtx: *mut ZL_Materializer,
            materialized: *mut ::std::os::raw::c_void,
        ),
    >,
    #[doc = " Optionally an opaque pointer that can be queried with\n ZL_Materializer_getOpaquePtr().\n OpenZL unconditionally takes ownership of this pointer, even if\n registration fails, and it lives for the lifetime of the owning\n compressor/dict store."]
    pub opaque: ZL_OpaquePtr,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_MaterializerDesc2"][::std::mem::size_of::<ZL_MaterializerDesc2>() - 40usize];
    ["Alignment of ZL_MaterializerDesc2"][::std::mem::align_of::<ZL_MaterializerDesc2>() - 8usize];
    ["Offset of field: ZL_MaterializerDesc2::materializeFn"]
        [::std::mem::offset_of!(ZL_MaterializerDesc2, materializeFn) - 0usize];
    ["Offset of field: ZL_MaterializerDesc2::dematerializeFn"]
        [::std::mem::offset_of!(ZL_MaterializerDesc2, dematerializeFn) - 8usize];
    ["Offset of field: ZL_MaterializerDesc2::opaque"]
        [::std::mem::offset_of!(ZL_MaterializerDesc2, opaque) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_MParam {
    pub content: *const ::std::os::raw::c_void,
    pub size: usize,
    #[doc = " For advanced use cases, you can specify a custom ID for this MParam. If\n unset, a default ID will be assigned."]
    pub mparamID: ZL_MParamID,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_MParam"][::std::mem::size_of::<ZL_MParam>() - 48usize];
    ["Alignment of ZL_MParam"][::std::mem::align_of::<ZL_MParam>() - 8usize];
    ["Offset of field: ZL_MParam::content"][::std::mem::offset_of!(ZL_MParam, content) - 0usize];
    ["Offset of field: ZL_MParam::size"][::std::mem::offset_of!(ZL_MParam, size) - 8usize];
    ["Offset of field: ZL_MParam::mparamID"][::std::mem::offset_of!(ZL_MParam, mparamID) - 16usize];
};
unsafe extern "C" {
    #[doc = " @returns true if @p id is non-NULL and not ZL_MPARAM_ID_NULL."]
    pub fn ZL_MParamID_hasValue(id: *const ZL_MParamID) -> bool;
}
#[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 = " Optional materializer descriptor for materialized local params.\n If both materializeFn and dematerializeFn are non-null, the materializer\n will be used to create materialized objects from local params."]
    pub materializer: ZL_MaterializerDesc,
    #[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_FunctionGraphDesc"][::std::mem::size_of::<ZL_FunctionGraphDesc>() - 184usize];
    ["Alignment of ZL_FunctionGraphDesc"][::std::mem::align_of::<ZL_FunctionGraphDesc>() - 8usize];
    ["Offset of field: ZL_FunctionGraphDesc::name"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, name) - 0usize];
    ["Offset of field: ZL_FunctionGraphDesc::graph_f"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, graph_f) - 8usize];
    ["Offset of field: ZL_FunctionGraphDesc::validate_f"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, validate_f) - 16usize];
    ["Offset of field: ZL_FunctionGraphDesc::inputTypeMasks"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, inputTypeMasks) - 24usize];
    ["Offset of field: ZL_FunctionGraphDesc::nbInputs"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, nbInputs) - 32usize];
    ["Offset of field: ZL_FunctionGraphDesc::lastInputIsVariable"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, lastInputIsVariable) - 40usize];
    ["Offset of field: ZL_FunctionGraphDesc::customGraphs"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, customGraphs) - 48usize];
    ["Offset of field: ZL_FunctionGraphDesc::nbCustomGraphs"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, nbCustomGraphs) - 56usize];
    ["Offset of field: ZL_FunctionGraphDesc::customNodes"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, customNodes) - 64usize];
    ["Offset of field: ZL_FunctionGraphDesc::nbCustomNodes"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, nbCustomNodes) - 72usize];
    ["Offset of field: ZL_FunctionGraphDesc::localParams"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, localParams) - 80usize];
    ["Offset of field: ZL_FunctionGraphDesc::materializer"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, materializer) - 128usize];
    ["Offset of field: ZL_FunctionGraphDesc::opaque"]
        [::std::mem::offset_of!(ZL_FunctionGraphDesc, opaque) - 160usize];
};
unsafe 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;
}
unsafe extern "C" {
    pub fn ZL_Compressor_registerFunctionGraph(
        compressor: *mut ZL_Compressor,
        dgd: *const ZL_FunctionGraphDesc,
    ) -> ZL_GraphID;
}
unsafe 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;
}
unsafe extern "C" {
    pub fn ZL_Graph_getCustomGraphs(gctx: *const ZL_Graph) -> ZL_GraphIDList;
}
unsafe extern "C" {
    pub fn ZL_Graph_getCustomNodes(gctx: *const ZL_Graph) -> ZL_NodeIDList;
}
unsafe extern "C" {
    pub fn ZL_Graph_getCParam(gctx: *const ZL_Graph, gparam: ZL_CParam) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn ZL_Graph_getLocalIntParam(
        gctx: *const ZL_Graph,
        intParamId: ::std::os::raw::c_int,
    ) -> ZL_IntParam;
}
unsafe extern "C" {
    pub fn ZL_Graph_getLocalRefParam(
        gctx: *const ZL_Graph,
        refParamId: ::std::os::raw::c_int,
    ) -> ZL_RefParam;
}
unsafe 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;
}
unsafe extern "C" {
    pub fn ZL_Graph_getOpaquePtr(graph: *const ZL_Graph) -> *const ::std::os::raw::c_void;
}
unsafe extern "C" {
    #[doc = " @brief Query the current graph execution depth.\n\n Returns the depth at which the current graph is executing.\n Depth 1 is the root graph; each successor level increments by 1.\n This can be used to detect runaway graph growth.\n\n @param gctx  Graph context, must be non-NULL.\n @return Current graph execution depth (>= 1)."]
    pub fn ZL_Graph_getDepth(gctx: *const ZL_Graph) -> ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub fn ZL_Edge_getData(sctx: *const ZL_Edge) -> *const ZL_Input;
}
unsafe 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 graph and may only be valid for\n the lifetime of the @p graph."]
    pub fn ZL_Graph_getErrorContextString(
        graph: *const ZL_Graph,
        report: ZL_Report,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " See ZL_Graph_getErrorContextString()\n\n @param error: The error to get the context for"]
    pub fn ZL_Graph_getErrorContextString_fromError(
        graph: *const ZL_Graph,
        error: ZL_Error,
    ) -> *const ::std::os::raw::c_char;
}
unsafe 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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_GraphPerformance"][::std::mem::size_of::<ZL_GraphPerformance>() - 8usize];
    ["Alignment of ZL_GraphPerformance"][::std::mem::align_of::<ZL_GraphPerformance>() - 8usize];
    ["Offset of field: ZL_GraphPerformance::compressedSize"]
        [::std::mem::offset_of!(ZL_GraphPerformance, compressedSize) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_Result_ZL_GraphPerformance_inner {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_GraphPerformance,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_GraphPerformance_inner"]
        [::std::mem::size_of::<ZL_Result_ZL_GraphPerformance_inner>() - 16usize];
    ["Alignment of ZL_Result_ZL_GraphPerformance_inner"]
        [::std::mem::align_of::<ZL_Result_ZL_GraphPerformance_inner>() - 8usize];
    ["Offset of field: ZL_Result_ZL_GraphPerformance_inner::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_GraphPerformance_inner, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_GraphPerformance_inner::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_GraphPerformance_inner, _value) - 8usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_GraphPerformance_u"]
        [::std::mem::size_of::<ZL_Result_ZL_GraphPerformance_u>() - 16usize];
    ["Alignment of ZL_Result_ZL_GraphPerformance_u"]
        [::std::mem::align_of::<ZL_Result_ZL_GraphPerformance_u>() - 8usize];
    ["Offset of field: ZL_Result_ZL_GraphPerformance_u::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_GraphPerformance_u, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_GraphPerformance_u::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_GraphPerformance_u, _value) - 0usize];
    ["Offset of field: ZL_Result_ZL_GraphPerformance_u::_error"]
        [::std::mem::offset_of!(ZL_Result_ZL_GraphPerformance_u, _error) - 0usize];
};
pub type ZL_Result_ZL_GraphPerformance = ZL_Result_ZL_GraphPerformance_u;
pub type ZL_Result_ZL_GraphPerformance_fake_type_needs_semicolon = ::std::os::raw::c_int;
unsafe 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;
}
unsafe 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 __bindgen_anon_1: ZL_EdgeList__bindgen_ty_1,
    pub __bindgen_anon_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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_EdgeList__bindgen_ty_1"]
        [::std::mem::size_of::<ZL_EdgeList__bindgen_ty_1>() - 8usize];
    ["Alignment of ZL_EdgeList__bindgen_ty_1"]
        [::std::mem::align_of::<ZL_EdgeList__bindgen_ty_1>() - 8usize];
    ["Offset of field: ZL_EdgeList__bindgen_ty_1::edges"]
        [::std::mem::offset_of!(ZL_EdgeList__bindgen_ty_1, edges) - 0usize];
    ["Offset of field: ZL_EdgeList__bindgen_ty_1::streams"]
        [::std::mem::offset_of!(ZL_EdgeList__bindgen_ty_1, streams) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZL_EdgeList__bindgen_ty_2 {
    pub nbEdges: usize,
    pub nbStreams: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_EdgeList__bindgen_ty_2"]
        [::std::mem::size_of::<ZL_EdgeList__bindgen_ty_2>() - 8usize];
    ["Alignment of ZL_EdgeList__bindgen_ty_2"]
        [::std::mem::align_of::<ZL_EdgeList__bindgen_ty_2>() - 8usize];
    ["Offset of field: ZL_EdgeList__bindgen_ty_2::nbEdges"]
        [::std::mem::offset_of!(ZL_EdgeList__bindgen_ty_2, nbEdges) - 0usize];
    ["Offset of field: ZL_EdgeList__bindgen_ty_2::nbStreams"]
        [::std::mem::offset_of!(ZL_EdgeList__bindgen_ty_2, nbStreams) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_EdgeList"][::std::mem::size_of::<ZL_EdgeList>() - 16usize];
    ["Alignment of ZL_EdgeList"][::std::mem::align_of::<ZL_EdgeList>() - 8usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ZL_Result_ZL_EdgeList_inner {
    pub _code: ZL_ErrorCode,
    pub _value: ZL_EdgeList,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_EdgeList_inner"]
        [::std::mem::size_of::<ZL_Result_ZL_EdgeList_inner>() - 24usize];
    ["Alignment of ZL_Result_ZL_EdgeList_inner"]
        [::std::mem::align_of::<ZL_Result_ZL_EdgeList_inner>() - 8usize];
    ["Offset of field: ZL_Result_ZL_EdgeList_inner::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_EdgeList_inner, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_EdgeList_inner::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_EdgeList_inner, _value) - 8usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_Result_ZL_EdgeList_u"][::std::mem::size_of::<ZL_Result_ZL_EdgeList_u>() - 24usize];
    ["Alignment of ZL_Result_ZL_EdgeList_u"]
        [::std::mem::align_of::<ZL_Result_ZL_EdgeList_u>() - 8usize];
    ["Offset of field: ZL_Result_ZL_EdgeList_u::_code"]
        [::std::mem::offset_of!(ZL_Result_ZL_EdgeList_u, _code) - 0usize];
    ["Offset of field: ZL_Result_ZL_EdgeList_u::_value"]
        [::std::mem::offset_of!(ZL_Result_ZL_EdgeList_u, _value) - 0usize];
    ["Offset of field: ZL_Result_ZL_EdgeList_u::_error"]
        [::std::mem::offset_of!(ZL_Result_ZL_EdgeList_u, _error) - 0usize];
};
pub type ZL_Result_ZL_EdgeList = ZL_Result_ZL_EdgeList_u;
pub type ZL_Result_ZL_EdgeList_fake_type_needs_semicolon = ::std::os::raw::c_int;
unsafe extern "C" {
    pub fn ZL_Edge_runNode(input: *mut ZL_Edge, nid: ZL_NodeID) -> ZL_Result_ZL_EdgeList;
}
unsafe extern "C" {
    pub fn ZL_Edge_runNode_withParams(
        input: *mut ZL_Edge,
        nid: ZL_NodeID,
        localParams: *const ZL_LocalParams,
    ) -> ZL_Result_ZL_EdgeList;
}
unsafe extern "C" {
    pub fn ZL_Edge_runMultiInputNode(
        inputs: *mut *mut ZL_Edge,
        nbInputs: usize,
        nid: ZL_NodeID,
    ) -> ZL_Result_ZL_EdgeList;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
    pub fn ZL_Edge_setDestination(edge: *mut ZL_Edge, gid: ZL_GraphID) -> ZL_Report;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_SetStringLensInstructions"]
        [::std::mem::size_of::<ZL_SetStringLensInstructions>() - 16usize];
    ["Alignment of ZL_SetStringLensInstructions"]
        [::std::mem::align_of::<ZL_SetStringLensInstructions>() - 8usize];
    ["Offset of field: ZL_SetStringLensInstructions::stringLens"]
        [::std::mem::offset_of!(ZL_SetStringLensInstructions, stringLens) - 0usize];
    ["Offset of field: ZL_SetStringLensInstructions::nbStrings"]
        [::std::mem::offset_of!(ZL_SetStringLensInstructions, nbStrings) - 8usize];
};
#[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,
>;
unsafe extern "C" {
    pub fn ZL_SetStringLensState_getOpaquePtr(
        state: *const ZL_SetStringLensState,
    ) -> *const ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn ZL_SetStringLensState_malloc(
        state: *mut ZL_SetStringLensState,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn ZL_Compressor_registerConvertSerialToStringNode(
        cgraph: *mut ZL_Compressor,
        f: ZL_SetStringLensParserFn,
        opaque: *const ::std::os::raw::c_void,
    ) -> ZL_NodeID;
}
unsafe 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;
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_DispatchInstructions"][::std::mem::size_of::<ZL_DispatchInstructions>() - 32usize];
    ["Alignment of ZL_DispatchInstructions"]
        [::std::mem::align_of::<ZL_DispatchInstructions>() - 8usize];
    ["Offset of field: ZL_DispatchInstructions::segmentSizes"]
        [::std::mem::offset_of!(ZL_DispatchInstructions, segmentSizes) - 0usize];
    ["Offset of field: ZL_DispatchInstructions::tags"]
        [::std::mem::offset_of!(ZL_DispatchInstructions, tags) - 8usize];
    ["Offset of field: ZL_DispatchInstructions::nbSegments"]
        [::std::mem::offset_of!(ZL_DispatchInstructions, nbSegments) - 16usize];
    ["Offset of field: ZL_DispatchInstructions::nbTags"]
        [::std::mem::offset_of!(ZL_DispatchInstructions, nbTags) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_DispatchState_s {
    _unused: [u8; 0],
}
pub type ZL_DispatchState = ZL_DispatchState_s;
unsafe extern "C" {
    pub fn ZL_DispatchState_malloc(
        state: *mut ZL_DispatchState,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe 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;
}
unsafe 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,
>;
unsafe extern "C" {
    pub fn ZL_Compressor_registerDispatchNode(
        cgraph: *mut ZL_Compressor,
        f: ZL_DispatchParserFn,
        opaque: *const ::std::os::raw::c_void,
    ) -> ZL_NodeID;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
    #[doc = " @returns ZL_GRAPH_LZ4 with overridden compression level"]
    pub fn ZL_Compressor_buildLZ4Graph(
        cgraph: *mut ZL_Compressor,
        compressionLevel: ::std::os::raw::c_int,
    ) -> ZL_Result_ZL_GraphID;
}
unsafe 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;
}
unsafe extern "C" {
    #[doc = " @brief Builds an untrained ML selector graph.\n\n The ML selector uses an XGBoost model to predict which successor to use for\n compression. Until trained, this selector always selects the first successor.\n\n Supported types: Numeric integer data.\n\n Training workflow:\n   1. Build your compressor with an ML selector graph using this function\n   2. Wrap the resulting graph with ZL_NODE_CONVERT_SERIAL_TO_NUM_LE# (for\n      #-bit data) and parameterize using ZL_Compressor_parameterizeGraph\n   3. Serialize the compressor: compressor.serialize() -> save to file.zlc\n   4. Train: ./zli train --compressor file.zlc <samples> -o trained.zli\n   5. Use:   ./zli compress --compressor trained.zli <input> -o <output.zl>\n\n Alternatively, use the built-in profile for 64-bit numeric data:\n   ./zli train --profile numeric-ml-selector-64 <samples> -o trained.zli\n\n Note: Successor ordering must stay the same between training and inference.\n\n See tools/ml_selector/README.md for more details and example.\n\n @param compressor The compressor to register the graph with\n @param successors The set of successor graphs to choose from\n @param nbSuccessors The number of successors\n @return The graph ID of the registered ML selector, or an error"]
    pub fn ZL_Compressor_buildUntrainedMLSelector(
        compressor: *mut ZL_Compressor,
        successors: *const ZL_GraphID,
        nbSuccessors: usize,
    ) -> ZL_Result_ZL_GraphID;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
    #[doc = " Run the general sentinel node on @p input within a function graph.\n\n Convenience wrapper around ZL_Edge_runNode_withParams() that packages\n exception indices and sentinel value as local params.\n\n @param input            The input edge to process\n @param exceptionIndices Sorted array of indices to move to exceptions\n @param numExceptions    Number of exception indices\n @param sentinel         The sentinel value to use\n @returns An EdgeList with 2 edges: [0] = values, [1] = exceptions"]
    pub fn ZL_Edge_runSentinelNode(
        input: *mut ZL_Edge,
        exceptionIndices: *const usize,
        numExceptions: usize,
        sentinel: u64,
    ) -> ZL_Result_ZL_EdgeList;
}
unsafe extern "C" {
    pub fn ZL_Compressor_registerSplitNode_withParams(
        cgraph: *mut ZL_Compressor,
        type_: ZL_Type,
        segmentSizes: *const usize,
        nbSegments: usize,
    ) -> ZL_NodeID;
}
unsafe 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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_SplitInstructions"][::std::mem::size_of::<ZL_SplitInstructions>() - 16usize];
    ["Alignment of ZL_SplitInstructions"][::std::mem::align_of::<ZL_SplitInstructions>() - 8usize];
    ["Offset of field: ZL_SplitInstructions::segmentSizes"]
        [::std::mem::offset_of!(ZL_SplitInstructions, segmentSizes) - 0usize];
    ["Offset of field: ZL_SplitInstructions::nbSegments"]
        [::std::mem::offset_of!(ZL_SplitInstructions, nbSegments) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZL_SplitState_s {
    _unused: [u8; 0],
}
pub type ZL_SplitState = ZL_SplitState_s;
unsafe extern "C" {
    pub fn ZL_SplitState_malloc(
        state: *mut ZL_SplitState,
        size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe 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,
>;
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
unsafe 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;
}
unsafe 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;
}
unsafe 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,
>;
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
    pub fn ZL_Edge_runTransposeSplit(
        edge: *mut ZL_Edge,
        graph: *const ZL_Graph,
    ) -> ZL_Result_ZL_EdgeList;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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);
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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(
        compressor: *mut ZL_Compressor,
        gcparam: ZL_CParam,
        value: ::std::os::raw::c_int,
    ) -> ZL_Report;
}
unsafe 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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_StaticGraphParameters"]
        [::std::mem::size_of::<ZL_StaticGraphParameters>() - 16usize];
    ["Alignment of ZL_StaticGraphParameters"]
        [::std::mem::align_of::<ZL_StaticGraphParameters>() - 8usize];
    ["Offset of field: ZL_StaticGraphParameters::name"]
        [::std::mem::offset_of!(ZL_StaticGraphParameters, name) - 0usize];
    ["Offset of field: ZL_StaticGraphParameters::localParams"]
        [::std::mem::offset_of!(ZL_StaticGraphParameters, localParams) - 8usize];
};
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_StaticGraphDesc"][::std::mem::size_of::<ZL_StaticGraphDesc>() - 40usize];
    ["Alignment of ZL_StaticGraphDesc"][::std::mem::align_of::<ZL_StaticGraphDesc>() - 8usize];
    ["Offset of field: ZL_StaticGraphDesc::name"]
        [::std::mem::offset_of!(ZL_StaticGraphDesc, name) - 0usize];
    ["Offset of field: ZL_StaticGraphDesc::headNodeid"]
        [::std::mem::offset_of!(ZL_StaticGraphDesc, headNodeid) - 8usize];
    ["Offset of field: ZL_StaticGraphDesc::successor_gids"]
        [::std::mem::offset_of!(ZL_StaticGraphDesc, successor_gids) - 16usize];
    ["Offset of field: ZL_StaticGraphDesc::nbGids"]
        [::std::mem::offset_of!(ZL_StaticGraphDesc, nbGids) - 24usize];
    ["Offset of field: ZL_StaticGraphDesc::localParams"]
        [::std::mem::offset_of!(ZL_StaticGraphDesc, localParams) - 32usize];
};
unsafe 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,
    #[doc = " Optionally, a new dict ID. If set to ZL_DICT_ID_NULL, then the dict ID\n is not updated."]
    pub dictID: ZL_DictID,
    #[doc = " Optionally, a new MParam."]
    pub mparam: ZL_MParam,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_NodeParameters"][::std::mem::size_of::<ZL_NodeParameters>() - 96usize];
    ["Alignment of ZL_NodeParameters"][::std::mem::align_of::<ZL_NodeParameters>() - 8usize];
    ["Offset of field: ZL_NodeParameters::name"]
        [::std::mem::offset_of!(ZL_NodeParameters, name) - 0usize];
    ["Offset of field: ZL_NodeParameters::localParams"]
        [::std::mem::offset_of!(ZL_NodeParameters, localParams) - 8usize];
    ["Offset of field: ZL_NodeParameters::dictID"]
        [::std::mem::offset_of!(ZL_NodeParameters, dictID) - 16usize];
    ["Offset of field: ZL_NodeParameters::mparam"]
        [::std::mem::offset_of!(ZL_NodeParameters, mparam) - 48usize];
};
unsafe 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,
    #[doc = " Optionally, a new dict ID. If set to ZL_DICT_ID_NULL, then the dict ID\n is not updated."]
    pub dictID: ZL_DictID,
    #[doc = " Optionally, a new MParam."]
    pub mparam: ZL_MParam,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_ParameterizedNodeDesc"]
        [::std::mem::size_of::<ZL_ParameterizedNodeDesc>() - 104usize];
    ["Alignment of ZL_ParameterizedNodeDesc"]
        [::std::mem::align_of::<ZL_ParameterizedNodeDesc>() - 8usize];
    ["Offset of field: ZL_ParameterizedNodeDesc::name"]
        [::std::mem::offset_of!(ZL_ParameterizedNodeDesc, name) - 0usize];
    ["Offset of field: ZL_ParameterizedNodeDesc::node"]
        [::std::mem::offset_of!(ZL_ParameterizedNodeDesc, node) - 8usize];
    ["Offset of field: ZL_ParameterizedNodeDesc::localParams"]
        [::std::mem::offset_of!(ZL_ParameterizedNodeDesc, localParams) - 16usize];
    ["Offset of field: ZL_ParameterizedNodeDesc::dictID"]
        [::std::mem::offset_of!(ZL_ParameterizedNodeDesc, dictID) - 24usize];
    ["Offset of field: ZL_ParameterizedNodeDesc::mparam"]
        [::std::mem::offset_of!(ZL_ParameterizedNodeDesc, mparam) - 56usize];
};
unsafe 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;
}
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_GraphParameters_s"][::std::mem::size_of::<ZL_GraphParameters_s>() - 48usize];
    ["Alignment of ZL_GraphParameters_s"][::std::mem::align_of::<ZL_GraphParameters_s>() - 8usize];
    ["Offset of field: ZL_GraphParameters_s::name"]
        [::std::mem::offset_of!(ZL_GraphParameters_s, name) - 0usize];
    ["Offset of field: ZL_GraphParameters_s::customGraphs"]
        [::std::mem::offset_of!(ZL_GraphParameters_s, customGraphs) - 8usize];
    ["Offset of field: ZL_GraphParameters_s::nbCustomGraphs"]
        [::std::mem::offset_of!(ZL_GraphParameters_s, nbCustomGraphs) - 16usize];
    ["Offset of field: ZL_GraphParameters_s::customNodes"]
        [::std::mem::offset_of!(ZL_GraphParameters_s, customNodes) - 24usize];
    ["Offset of field: ZL_GraphParameters_s::nbCustomNodes"]
        [::std::mem::offset_of!(ZL_GraphParameters_s, nbCustomNodes) - 32usize];
    ["Offset of field: ZL_GraphParameters_s::localParams"]
        [::std::mem::offset_of!(ZL_GraphParameters_s, localParams) - 40usize];
};
#[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;
unsafe 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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ZL_ParameterizedGraphDesc"]
        [::std::mem::size_of::<ZL_ParameterizedGraphDesc>() - 56usize];
    ["Alignment of ZL_ParameterizedGraphDesc"]
        [::std::mem::align_of::<ZL_ParameterizedGraphDesc>() - 8usize];
    ["Offset of field: ZL_ParameterizedGraphDesc::name"]
        [::std::mem::offset_of!(ZL_ParameterizedGraphDesc, name) - 0usize];
    ["Offset of field: ZL_ParameterizedGraphDesc::graph"]
        [::std::mem::offset_of!(ZL_ParameterizedGraphDesc, graph) - 8usize];
    ["Offset of field: ZL_ParameterizedGraphDesc::customGraphs"]
        [::std::mem::offset_of!(ZL_ParameterizedGraphDesc, customGraphs) - 16usize];
    ["Offset of field: ZL_ParameterizedGraphDesc::nbCustomGraphs"]
        [::std::mem::offset_of!(ZL_ParameterizedGraphDesc, nbCustomGraphs) - 24usize];
    ["Offset of field: ZL_ParameterizedGraphDesc::customNodes"]
        [::std::mem::offset_of!(ZL_ParameterizedGraphDesc, customNodes) - 32usize];
    ["Offset of field: ZL_ParameterizedGraphDesc::nbCustomNodes"]
        [::std::mem::offset_of!(ZL_ParameterizedGraphDesc, nbCustomNodes) - 40usize];
    ["Offset of field: ZL_ParameterizedGraphDesc::localParams"]
        [::std::mem::offset_of!(ZL_ParameterizedGraphDesc, localParams) - 48usize];
};
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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>;
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
    #[doc = " Fetches the bundle ID in-use by the compressor, if there is one.\n Returns NULL if no bundle has been set."]
    pub fn ZL_Compressor_getDictBundleID(compressor: *const ZL_Compressor) -> *const ZL_BundleID;
}
unsafe extern "C" {
    #[doc = " This is a convenience implementation to provide a serialized ZL_DictBundle\n and associated serialized ZL_Dict to the compressor.\n\n This function expects an all-in-one \"fat\" bundle generated by the training\n scripts. This can be produced some other way, but training is guaranteed to\n generate a valid fat bundle if provided the option --fat-bundle."]
    pub fn ZL_Compressor_loadDictBundle(
        compressor: *mut ZL_Compressor,
        serializedDictBundle: *const ::std::os::raw::c_void,
        serializedDictBundleSize: usize,
    ) -> ZL_Report;
}