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
/* automatically generated by rust-bindgen */

pub const ZSTD_VERSION_MAJOR: u32 = 1;
pub const ZSTD_VERSION_MINOR: u32 = 4;
pub const ZSTD_VERSION_RELEASE: u32 = 3;
pub const ZSTD_VERSION_NUMBER: u32 = 10403;
pub const ZSTD_CLEVEL_DEFAULT: u32 = 3;
pub const ZSTD_MAGICNUMBER: u32 = 4247762216;
pub const ZSTD_MAGIC_DICTIONARY: u32 = 3962610743;
pub const ZSTD_MAGIC_SKIPPABLE_START: u32 = 407710288;
pub const ZSTD_MAGIC_SKIPPABLE_MASK: u32 = 4294967280;
pub const ZSTD_BLOCKSIZELOG_MAX: u32 = 17;
pub const ZSTD_BLOCKSIZE_MAX: u32 = 131072;
pub const ZSTD_CONTENTSIZE_UNKNOWN: i32 = -1;
pub const ZSTD_CONTENTSIZE_ERROR: i32 = -2;
pub type wchar_t = ::libc::c_int;
extern "C" {
    pub fn ZSTD_versionNumber() -> ::libc::c_uint;
}
extern "C" {
    pub fn ZSTD_versionString() -> *const ::libc::c_char;
}
extern "C" {
    #[doc = "  Simple API"]
    #[doc = "  Compresses `src` content as a single zstd compressed frame into already allocated `dst`."]
    #[doc = "  Hint : compression runs faster if `dstCapacity` >=  `ZSTD_compressBound(srcSize)`."]
    #[doc = "  @return : compressed size written into `dst` (<= `dstCapacity),"]
    #[doc = "            or an error code if it fails (which can be tested using ZSTD_isError())."]
    pub fn ZSTD_compress(
        dst: *mut ::libc::c_void,
        dstCapacity: usize,
        src: *const ::libc::c_void,
        srcSize: usize,
        compressionLevel: ::libc::c_int,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_decompress() :"]
    #[doc = "  `compressedSize` : must be the _exact_ size of some number of compressed and/or skippable frames."]
    #[doc = "  `dstCapacity` is an upper bound of originalSize to regenerate."]
    #[doc = "  If user cannot imply a maximum upper bound, it's better to use streaming mode to decompress data."]
    #[doc = "  @return : the number of bytes decompressed into `dst` (<= `dstCapacity`),"]
    #[doc = "            or an errorCode if it fails (which can be tested using ZSTD_isError())."]
    pub fn ZSTD_decompress(
        dst: *mut ::libc::c_void,
        dstCapacity: usize,
        src: *const ::libc::c_void,
        compressedSize: usize,
    ) -> usize;
}
extern "C" {
    pub fn ZSTD_getFrameContentSize(
        src: *const ::libc::c_void,
        srcSize: usize,
    ) -> ::libc::c_ulonglong;
}
extern "C" {
    #[doc = " ZSTD_getDecompressedSize() :"]
    #[doc = "  NOTE: This function is now obsolete, in favor of ZSTD_getFrameContentSize()."]
    #[doc = "  Both functions work the same way, but ZSTD_getDecompressedSize() blends"]
    #[doc = "  \"empty\", \"unknown\" and \"error\" results to the same return value (0),"]
    #[doc = "  while ZSTD_getFrameContentSize() gives them separate return values."]
    #[doc = " @return : decompressed size of `src` frame content _if known and not empty_, 0 otherwise."]
    pub fn ZSTD_getDecompressedSize(
        src: *const ::libc::c_void,
        srcSize: usize,
    ) -> ::libc::c_ulonglong;
}
extern "C" {
    #[doc = " ZSTD_findFrameCompressedSize() :"]
    #[doc = " `src` should point to the start of a ZSTD frame or skippable frame."]
    #[doc = " `srcSize` must be >= first frame size"]
    #[doc = " @return : the compressed size of the first frame starting at `src`,"]
    #[doc = "           suitable to pass as `srcSize` to `ZSTD_decompress` or similar,"]
    #[doc = "        or an error code if input is invalid"]
    pub fn ZSTD_findFrameCompressedSize(
        src: *const ::libc::c_void,
        srcSize: usize,
    ) -> usize;
}
extern "C" {
    pub fn ZSTD_compressBound(srcSize: usize) -> usize;
}
extern "C" {
    pub fn ZSTD_isError(code: usize) -> ::libc::c_uint;
}
extern "C" {
    pub fn ZSTD_getErrorName(code: usize) -> *const ::libc::c_char;
}
extern "C" {
    pub fn ZSTD_minCLevel() -> ::libc::c_int;
}
extern "C" {
    pub fn ZSTD_maxCLevel() -> ::libc::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_CCtx_s {
    _unused: [u8; 0],
}
#[doc = "  Explicit context"]
pub type ZSTD_CCtx = ZSTD_CCtx_s;
extern "C" {
    pub fn ZSTD_createCCtx() -> *mut ZSTD_CCtx;
}
extern "C" {
    pub fn ZSTD_freeCCtx(cctx: *mut ZSTD_CCtx) -> usize;
}
extern "C" {
    #[doc = " ZSTD_compressCCtx() :"]
    #[doc = "  Same as ZSTD_compress(), using an explicit ZSTD_CCtx"]
    #[doc = "  The function will compress at requested compression level,"]
    #[doc = "  ignoring any other parameter"]
    pub fn ZSTD_compressCCtx(
        cctx: *mut ZSTD_CCtx,
        dst: *mut ::libc::c_void,
        dstCapacity: usize,
        src: *const ::libc::c_void,
        srcSize: usize,
        compressionLevel: ::libc::c_int,
    ) -> usize;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_DCtx_s {
    _unused: [u8; 0],
}
pub type ZSTD_DCtx = ZSTD_DCtx_s;
extern "C" {
    pub fn ZSTD_createDCtx() -> *mut ZSTD_DCtx;
}
extern "C" {
    pub fn ZSTD_freeDCtx(dctx: *mut ZSTD_DCtx) -> usize;
}
extern "C" {
    #[doc = " ZSTD_decompressDCtx() :"]
    #[doc = "  Same as ZSTD_decompress(),"]
    #[doc = "  requires an allocated ZSTD_DCtx."]
    #[doc = "  Compatible with sticky parameters."]
    pub fn ZSTD_decompressDCtx(
        dctx: *mut ZSTD_DCtx,
        dst: *mut ::libc::c_void,
        dstCapacity: usize,
        src: *const ::libc::c_void,
        srcSize: usize,
    ) -> usize;
}
#[repr(u32)]
#[doc = "  Advanced compression API"]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ZSTD_strategy {
    ZSTD_fast = 1,
    ZSTD_dfast = 2,
    ZSTD_greedy = 3,
    ZSTD_lazy = 4,
    ZSTD_lazy2 = 5,
    ZSTD_btlazy2 = 6,
    ZSTD_btopt = 7,
    ZSTD_btultra = 8,
    ZSTD_btultra2 = 9,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ZSTD_cParameter {
    ZSTD_c_compressionLevel = 100,
    ZSTD_c_windowLog = 101,
    ZSTD_c_hashLog = 102,
    ZSTD_c_chainLog = 103,
    ZSTD_c_searchLog = 104,
    ZSTD_c_minMatch = 105,
    ZSTD_c_targetLength = 106,
    ZSTD_c_strategy = 107,
    ZSTD_c_enableLongDistanceMatching = 160,
    ZSTD_c_ldmHashLog = 161,
    ZSTD_c_ldmMinMatch = 162,
    ZSTD_c_ldmBucketSizeLog = 163,
    ZSTD_c_ldmHashRateLog = 164,
    ZSTD_c_contentSizeFlag = 200,
    ZSTD_c_checksumFlag = 201,
    ZSTD_c_dictIDFlag = 202,
    ZSTD_c_nbWorkers = 400,
    ZSTD_c_jobSize = 401,
    ZSTD_c_overlapLog = 402,
    ZSTD_c_experimentalParam1 = 500,
    ZSTD_c_experimentalParam2 = 10,
    ZSTD_c_experimentalParam3 = 1000,
    ZSTD_c_experimentalParam4 = 1001,
    ZSTD_c_experimentalParam5 = 1002,
    ZSTD_c_experimentalParam6 = 1003,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_bounds {
    pub error: usize,
    pub lowerBound: ::libc::c_int,
    pub upperBound: ::libc::c_int,
}
#[test]
fn bindgen_test_layout_ZSTD_bounds() {
    assert_eq!(
        ::core::mem::size_of::<ZSTD_bounds>(),
        16usize,
        concat!("Size of: ", stringify!(ZSTD_bounds))
    );
    assert_eq!(
        ::core::mem::align_of::<ZSTD_bounds>(),
        8usize,
        concat!("Alignment of ", stringify!(ZSTD_bounds))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ZSTD_bounds>())).error as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ZSTD_bounds),
            "::",
            stringify!(error)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ZSTD_bounds>())).lowerBound as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ZSTD_bounds),
            "::",
            stringify!(lowerBound)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ZSTD_bounds>())).upperBound as *const _
                as usize
        },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ZSTD_bounds),
            "::",
            stringify!(upperBound)
        )
    );
}
extern "C" {
    #[doc = " ZSTD_cParam_getBounds() :"]
    #[doc = "  All parameters must belong to an interval with lower and upper bounds,"]
    #[doc = "  otherwise they will either trigger an error or be automatically clamped."]
    #[doc = " @return : a structure, ZSTD_bounds, which contains"]
    #[doc = "         - an error status field, which must be tested using ZSTD_isError()"]
    #[doc = "         - lower and upper bounds, both inclusive"]
    pub fn ZSTD_cParam_getBounds(cParam: ZSTD_cParameter) -> ZSTD_bounds;
}
extern "C" {
    #[doc = " ZSTD_CCtx_setParameter() :"]
    #[doc = "  Set one compression parameter, selected by enum ZSTD_cParameter."]
    #[doc = "  All parameters have valid bounds. Bounds can be queried using ZSTD_cParam_getBounds()."]
    #[doc = "  Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter)."]
    #[doc = "  Setting a parameter is generally only possible during frame initialization (before starting compression)."]
    #[doc = "  Exception : when using multi-threading mode (nbWorkers >= 1),"]
    #[doc = "              the following parameters can be updated _during_ compression (within same frame):"]
    #[doc = "              => compressionLevel, hashLog, chainLog, searchLog, minMatch, targetLength and strategy."]
    #[doc = "              new parameters will be active for next job only (after a flush())."]
    #[doc = " @return : an error code (which can be tested using ZSTD_isError())."]
    pub fn ZSTD_CCtx_setParameter(
        cctx: *mut ZSTD_CCtx,
        param: ZSTD_cParameter,
        value: ::libc::c_int,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_CCtx_setPledgedSrcSize() :"]
    #[doc = "  Total input data size to be compressed as a single frame."]
    #[doc = "  Value will be written in frame header, unless if explicitly forbidden using ZSTD_c_contentSizeFlag."]
    #[doc = "  This value will also be controlled at end of frame, and trigger an error if not respected."]
    #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
    #[doc = "  Note 1 : pledgedSrcSize==0 actually means zero, aka an empty frame."]
    #[doc = "           In order to mean \"unknown content size\", pass constant ZSTD_CONTENTSIZE_UNKNOWN."]
    #[doc = "           ZSTD_CONTENTSIZE_UNKNOWN is default value for any new frame."]
    #[doc = "  Note 2 : pledgedSrcSize is only valid once, for the next frame."]
    #[doc = "           It's discarded at the end of the frame, and replaced by ZSTD_CONTENTSIZE_UNKNOWN."]
    #[doc = "  Note 3 : Whenever all input data is provided and consumed in a single round,"]
    #[doc = "           for example with ZSTD_compress2(),"]
    #[doc = "           or invoking immediately ZSTD_compressStream2(,,,ZSTD_e_end),"]
    #[doc = "           this value is automatically overridden by srcSize instead."]
    pub fn ZSTD_CCtx_setPledgedSrcSize(
        cctx: *mut ZSTD_CCtx,
        pledgedSrcSize: ::libc::c_ulonglong,
    ) -> usize;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ZSTD_ResetDirective {
    ZSTD_reset_session_only = 1,
    ZSTD_reset_parameters = 2,
    ZSTD_reset_session_and_parameters = 3,
}
extern "C" {
    #[doc = " ZSTD_CCtx_reset() :"]
    #[doc = "  There are 2 different things that can be reset, independently or jointly :"]
    #[doc = "  - The session : will stop compressing current frame, and make CCtx ready to start a new one."]
    #[doc = "                  Useful after an error, or to interrupt any ongoing compression."]
    #[doc = "                  Any internal data not yet flushed is cancelled."]
    #[doc = "                  Compression parameters and dictionary remain unchanged."]
    #[doc = "                  They will be used to compress next frame."]
    #[doc = "                  Resetting session never fails."]
    #[doc = "  - The parameters : changes all parameters back to \"default\"."]
    #[doc = "                  This removes any reference to any dictionary too."]
    #[doc = "                  Parameters can only be changed between 2 sessions (i.e. no compression is currently ongoing)"]
    #[doc = "                  otherwise the reset fails, and function returns an error value (which can be tested using ZSTD_isError())"]
    #[doc = "  - Both : similar to resetting the session, followed by resetting parameters."]
    pub fn ZSTD_CCtx_reset(
        cctx: *mut ZSTD_CCtx,
        reset: ZSTD_ResetDirective,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_compress2() :"]
    #[doc = "  Behave the same as ZSTD_compressCCtx(), but compression parameters are set using the advanced API."]
    #[doc = "  ZSTD_compress2() always starts a new frame."]
    #[doc = "  Should cctx hold data from a previously unfinished frame, everything about it is forgotten."]
    #[doc = "  - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*()"]
    #[doc = "  - The function is always blocking, returns when compression is completed."]
    #[doc = "  Hint : compression runs faster if `dstCapacity` >=  `ZSTD_compressBound(srcSize)`."]
    #[doc = " @return : compressed size written into `dst` (<= `dstCapacity),"]
    #[doc = "           or an error code if it fails (which can be tested using ZSTD_isError())."]
    pub fn ZSTD_compress2(
        cctx: *mut ZSTD_CCtx,
        dst: *mut ::libc::c_void,
        dstCapacity: usize,
        src: *const ::libc::c_void,
        srcSize: usize,
    ) -> usize;
}
#[repr(u32)]
#[doc = "  Advanced decompression API"]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ZSTD_dParameter {
    ZSTD_d_windowLogMax = 100,
    ZSTD_d_experimentalParam1 = 1000,
}
extern "C" {
    #[doc = " ZSTD_dParam_getBounds() :"]
    #[doc = "  All parameters must belong to an interval with lower and upper bounds,"]
    #[doc = "  otherwise they will either trigger an error or be automatically clamped."]
    #[doc = " @return : a structure, ZSTD_bounds, which contains"]
    #[doc = "         - an error status field, which must be tested using ZSTD_isError()"]
    #[doc = "         - both lower and upper bounds, inclusive"]
    pub fn ZSTD_dParam_getBounds(dParam: ZSTD_dParameter) -> ZSTD_bounds;
}
extern "C" {
    #[doc = " ZSTD_DCtx_setParameter() :"]
    #[doc = "  Set one compression parameter, selected by enum ZSTD_dParameter."]
    #[doc = "  All parameters have valid bounds. Bounds can be queried using ZSTD_dParam_getBounds()."]
    #[doc = "  Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter)."]
    #[doc = "  Setting a parameter is only possible during frame initialization (before starting decompression)."]
    #[doc = " @return : 0, or an error code (which can be tested using ZSTD_isError())."]
    pub fn ZSTD_DCtx_setParameter(
        dctx: *mut ZSTD_DCtx,
        param: ZSTD_dParameter,
        value: ::libc::c_int,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_DCtx_reset() :"]
    #[doc = "  Return a DCtx to clean state."]
    #[doc = "  Session and parameters can be reset jointly or separately."]
    #[doc = "  Parameters can only be reset when no active frame is being decompressed."]
    #[doc = " @return : 0, or an error code, which can be tested with ZSTD_isError()"]
    pub fn ZSTD_DCtx_reset(
        dctx: *mut ZSTD_DCtx,
        reset: ZSTD_ResetDirective,
    ) -> usize;
}
#[doc = "  Streaming"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_inBuffer_s {
    #[doc = "< start of input buffer"]
    pub src: *const ::libc::c_void,
    #[doc = "< size of input buffer"]
    pub size: usize,
    #[doc = "< position where reading stopped. Will be updated. Necessarily 0 <= pos <= size"]
    pub pos: usize,
}
#[test]
fn bindgen_test_layout_ZSTD_inBuffer_s() {
    assert_eq!(
        ::core::mem::size_of::<ZSTD_inBuffer_s>(),
        24usize,
        concat!("Size of: ", stringify!(ZSTD_inBuffer_s))
    );
    assert_eq!(
        ::core::mem::align_of::<ZSTD_inBuffer_s>(),
        8usize,
        concat!("Alignment of ", stringify!(ZSTD_inBuffer_s))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ZSTD_inBuffer_s>())).src as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ZSTD_inBuffer_s),
            "::",
            stringify!(src)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ZSTD_inBuffer_s>())).size as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ZSTD_inBuffer_s),
            "::",
            stringify!(size)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ZSTD_inBuffer_s>())).pos as *const _
                as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ZSTD_inBuffer_s),
            "::",
            stringify!(pos)
        )
    );
}
pub type ZSTD_inBuffer = ZSTD_inBuffer_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_outBuffer_s {
    #[doc = "< start of output buffer"]
    pub dst: *mut ::libc::c_void,
    #[doc = "< size of output buffer"]
    pub size: usize,
    #[doc = "< position where writing stopped. Will be updated. Necessarily 0 <= pos <= size"]
    pub pos: usize,
}
#[test]
fn bindgen_test_layout_ZSTD_outBuffer_s() {
    assert_eq!(
        ::core::mem::size_of::<ZSTD_outBuffer_s>(),
        24usize,
        concat!("Size of: ", stringify!(ZSTD_outBuffer_s))
    );
    assert_eq!(
        ::core::mem::align_of::<ZSTD_outBuffer_s>(),
        8usize,
        concat!("Alignment of ", stringify!(ZSTD_outBuffer_s))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ZSTD_outBuffer_s>())).dst as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ZSTD_outBuffer_s),
            "::",
            stringify!(dst)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ZSTD_outBuffer_s>())).size as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ZSTD_outBuffer_s),
            "::",
            stringify!(size)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ZSTD_outBuffer_s>())).pos as *const _
                as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ZSTD_outBuffer_s),
            "::",
            stringify!(pos)
        )
    );
}
pub type ZSTD_outBuffer = ZSTD_outBuffer_s;
pub type ZSTD_CStream = ZSTD_CCtx;
extern "C" {
    pub fn ZSTD_createCStream() -> *mut ZSTD_CStream;
}
extern "C" {
    pub fn ZSTD_freeCStream(zcs: *mut ZSTD_CStream) -> usize;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ZSTD_EndDirective {
    ZSTD_e_continue = 0,
    ZSTD_e_flush = 1,
    ZSTD_e_end = 2,
}
extern "C" {
    #[doc = " ZSTD_compressStream2() :"]
    #[doc = "  Behaves about the same as ZSTD_compressStream, with additional control on end directive."]
    #[doc = "  - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*()"]
    #[doc = "  - Compression parameters cannot be changed once compression is started (save a list of exceptions in multi-threading mode)"]
    #[doc = "  - output->pos must be <= dstCapacity, input->pos must be <= srcSize"]
    #[doc = "  - output->pos and input->pos will be updated. They are guaranteed to remain below their respective limit."]
    #[doc = "  - When nbWorkers==0 (default), function is blocking : it completes its job before returning to caller."]
    #[doc = "  - When nbWorkers>=1, function is non-blocking : it just acquires a copy of input, and distributes jobs to internal worker threads, flush whatever is available,"]
    #[doc = "                                                  and then immediately returns, just indicating that there is some data remaining to be flushed."]
    #[doc = "                                                  The function nonetheless guarantees forward progress : it will return only after it reads or write at least 1+ byte."]
    #[doc = "  - Exception : if the first call requests a ZSTD_e_end directive and provides enough dstCapacity, the function delegates to ZSTD_compress2() which is always blocking."]
    #[doc = "  - @return provides a minimum amount of data remaining to be flushed from internal buffers"]
    #[doc = "            or an error code, which can be tested using ZSTD_isError()."]
    #[doc = "            if @return != 0, flush is not fully completed, there is still some data left within internal buffers."]
    #[doc = "            This is useful for ZSTD_e_flush, since in this case more flushes are necessary to empty all buffers."]
    #[doc = "            For ZSTD_e_end, @return == 0 when internal buffers are fully flushed and frame is completed."]
    #[doc = "  - after a ZSTD_e_end directive, if internal buffer is not fully flushed (@return != 0),"]
    #[doc = "            only ZSTD_e_end or ZSTD_e_flush operations are allowed."]
    #[doc = "            Before starting a new compression job, or changing compression parameters,"]
    #[doc = "            it is required to fully flush internal buffers."]
    pub fn ZSTD_compressStream2(
        cctx: *mut ZSTD_CCtx,
        output: *mut ZSTD_outBuffer,
        input: *mut ZSTD_inBuffer,
        endOp: ZSTD_EndDirective,
    ) -> usize;
}
extern "C" {
    pub fn ZSTD_CStreamInSize() -> usize;
}
extern "C" {
    pub fn ZSTD_CStreamOutSize() -> usize;
}
extern "C" {
    #[doc = " Equivalent to:"]
    #[doc = ""]
    #[doc = "     ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only);"]
    #[doc = "     ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any)"]
    #[doc = "     ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel);"]
    pub fn ZSTD_initCStream(
        zcs: *mut ZSTD_CStream,
        compressionLevel: ::libc::c_int,
    ) -> usize;
}
extern "C" {
    #[doc = " Alternative for ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue)."]
    #[doc = " NOTE: The return value is different. ZSTD_compressStream() returns a hint for"]
    #[doc = " the next read size (if non-zero and not an error). ZSTD_compressStream2()"]
    #[doc = " returns the minimum nb of bytes left to flush (if non-zero and not an error)."]
    pub fn ZSTD_compressStream(
        zcs: *mut ZSTD_CStream,
        output: *mut ZSTD_outBuffer,
        input: *mut ZSTD_inBuffer,
    ) -> usize;
}
extern "C" {
    #[doc = " Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_flush)."]
    pub fn ZSTD_flushStream(
        zcs: *mut ZSTD_CStream,
        output: *mut ZSTD_outBuffer,
    ) -> usize;
}
extern "C" {
    #[doc = " Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_end)."]
    pub fn ZSTD_endStream(
        zcs: *mut ZSTD_CStream,
        output: *mut ZSTD_outBuffer,
    ) -> usize;
}
pub type ZSTD_DStream = ZSTD_DCtx;
extern "C" {
    pub fn ZSTD_createDStream() -> *mut ZSTD_DStream;
}
extern "C" {
    pub fn ZSTD_freeDStream(zds: *mut ZSTD_DStream) -> usize;
}
extern "C" {
    pub fn ZSTD_initDStream(zds: *mut ZSTD_DStream) -> usize;
}
extern "C" {
    pub fn ZSTD_decompressStream(
        zds: *mut ZSTD_DStream,
        output: *mut ZSTD_outBuffer,
        input: *mut ZSTD_inBuffer,
    ) -> usize;
}
extern "C" {
    pub fn ZSTD_DStreamInSize() -> usize;
}
extern "C" {
    pub fn ZSTD_DStreamOutSize() -> usize;
}
extern "C" {
    #[doc = "  Simple dictionary API"]
    #[doc = "  Compression at an explicit compression level using a Dictionary."]
    #[doc = "  A dictionary can be any arbitrary data segment (also called a prefix),"]
    #[doc = "  or a buffer with specified information (see dictBuilder/zdict.h)."]
    #[doc = "  Note : This function loads the dictionary, resulting in significant startup delay."]
    #[doc = "         It's intended for a dictionary used only once."]
    #[doc = "  Note 2 : When `dict == NULL || dictSize < 8` no dictionary is used."]
    pub fn ZSTD_compress_usingDict(
        ctx: *mut ZSTD_CCtx,
        dst: *mut ::libc::c_void,
        dstCapacity: usize,
        src: *const ::libc::c_void,
        srcSize: usize,
        dict: *const ::libc::c_void,
        dictSize: usize,
        compressionLevel: ::libc::c_int,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_decompress_usingDict() :"]
    #[doc = "  Decompression using a known Dictionary."]
    #[doc = "  Dictionary must be identical to the one used during compression."]
    #[doc = "  Note : This function loads the dictionary, resulting in significant startup delay."]
    #[doc = "         It's intended for a dictionary used only once."]
    #[doc = "  Note : When `dict == NULL || dictSize < 8` no dictionary is used."]
    pub fn ZSTD_decompress_usingDict(
        dctx: *mut ZSTD_DCtx,
        dst: *mut ::libc::c_void,
        dstCapacity: usize,
        src: *const ::libc::c_void,
        srcSize: usize,
        dict: *const ::libc::c_void,
        dictSize: usize,
    ) -> usize;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_CDict_s {
    _unused: [u8; 0],
}
#[doc = "  Bulk processing dictionary API"]
pub type ZSTD_CDict = ZSTD_CDict_s;
extern "C" {
    #[doc = " ZSTD_createCDict() :"]
    #[doc = "  When compressing multiple messages / blocks using the same dictionary, it's recommended to load it only once."]
    #[doc = "  ZSTD_createCDict() will create a digested dictionary, ready to start future compression operations without startup cost."]
    #[doc = "  ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only."]
    #[doc = " `dictBuffer` can be released after ZSTD_CDict creation, because its content is copied within CDict."]
    #[doc = "  Consider experimental function `ZSTD_createCDict_byReference()` if you prefer to not duplicate `dictBuffer` content."]
    #[doc = "  Note : A ZSTD_CDict can be created from an empty dictBuffer, but it is inefficient when used to compress small data."]
    pub fn ZSTD_createCDict(
        dictBuffer: *const ::libc::c_void,
        dictSize: usize,
        compressionLevel: ::libc::c_int,
    ) -> *mut ZSTD_CDict;
}
extern "C" {
    #[doc = " ZSTD_freeCDict() :"]
    #[doc = "  Function frees memory allocated by ZSTD_createCDict()."]
    pub fn ZSTD_freeCDict(CDict: *mut ZSTD_CDict) -> usize;
}
extern "C" {
    #[doc = " ZSTD_compress_usingCDict() :"]
    #[doc = "  Compression using a digested Dictionary."]
    #[doc = "  Recommended when same dictionary is used multiple times."]
    #[doc = "  Note : compression level is _decided at dictionary creation time_,"]
    #[doc = "     and frame parameters are hardcoded (dictID=yes, contentSize=yes, checksum=no)"]
    pub fn ZSTD_compress_usingCDict(
        cctx: *mut ZSTD_CCtx,
        dst: *mut ::libc::c_void,
        dstCapacity: usize,
        src: *const ::libc::c_void,
        srcSize: usize,
        cdict: *const ZSTD_CDict,
    ) -> usize;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_DDict_s {
    _unused: [u8; 0],
}
pub type ZSTD_DDict = ZSTD_DDict_s;
extern "C" {
    #[doc = " ZSTD_createDDict() :"]
    #[doc = "  Create a digested dictionary, ready to start decompression operation without startup delay."]
    #[doc = "  dictBuffer can be released after DDict creation, as its content is copied inside DDict."]
    pub fn ZSTD_createDDict(
        dictBuffer: *const ::libc::c_void,
        dictSize: usize,
    ) -> *mut ZSTD_DDict;
}
extern "C" {
    #[doc = " ZSTD_freeDDict() :"]
    #[doc = "  Function frees memory allocated with ZSTD_createDDict()"]
    pub fn ZSTD_freeDDict(ddict: *mut ZSTD_DDict) -> usize;
}
extern "C" {
    #[doc = " ZSTD_decompress_usingDDict() :"]
    #[doc = "  Decompression using a digested Dictionary."]
    #[doc = "  Recommended when same dictionary is used multiple times."]
    pub fn ZSTD_decompress_usingDDict(
        dctx: *mut ZSTD_DCtx,
        dst: *mut ::libc::c_void,
        dstCapacity: usize,
        src: *const ::libc::c_void,
        srcSize: usize,
        ddict: *const ZSTD_DDict,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_getDictID_fromDict() :"]
    #[doc = "  Provides the dictID stored within dictionary."]
    #[doc = "  if @return == 0, the dictionary is not conformant with Zstandard specification."]
    #[doc = "  It can still be loaded, but as a content-only dictionary."]
    pub fn ZSTD_getDictID_fromDict(
        dict: *const ::libc::c_void,
        dictSize: usize,
    ) -> ::libc::c_uint;
}
extern "C" {
    #[doc = " ZSTD_getDictID_fromDDict() :"]
    #[doc = "  Provides the dictID of the dictionary loaded into `ddict`."]
    #[doc = "  If @return == 0, the dictionary is not conformant to Zstandard specification, or empty."]
    #[doc = "  Non-conformant dictionaries can still be loaded, but as content-only dictionaries."]
    pub fn ZSTD_getDictID_fromDDict(
        ddict: *const ZSTD_DDict,
    ) -> ::libc::c_uint;
}
extern "C" {
    #[doc = " ZSTD_getDictID_fromFrame() :"]
    #[doc = "  Provides the dictID required to decompressed the frame stored within `src`."]
    #[doc = "  If @return == 0, the dictID could not be decoded."]
    #[doc = "  This could for one of the following reasons :"]
    #[doc = "  - The frame does not require a dictionary to be decoded (most common case)."]
    #[doc = "  - The frame was built with dictID intentionally removed. Whatever dictionary is necessary is a hidden information."]
    #[doc = "    Note : this use case also happens when using a non-conformant dictionary."]
    #[doc = "  - `srcSize` is too small, and as a result, the frame header could not be decoded (only possible if `srcSize < ZSTD_FRAMEHEADERSIZE_MAX`)."]
    #[doc = "  - This is not a Zstandard frame."]
    #[doc = "  When identifying the exact failure cause, it's possible to use ZSTD_getFrameHeader(), which will provide a more precise error code."]
    pub fn ZSTD_getDictID_fromFrame(
        src: *const ::libc::c_void,
        srcSize: usize,
    ) -> ::libc::c_uint;
}
extern "C" {
    #[doc = " ZSTD_CCtx_loadDictionary() :"]
    #[doc = "  Create an internal CDict from `dict` buffer."]
    #[doc = "  Decompression will have to use same dictionary."]
    #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
    #[doc = "  Special: Loading a NULL (or 0-size) dictionary invalidates previous dictionary,"]
    #[doc = "           meaning \"return to no-dictionary mode\"."]
    #[doc = "  Note 1 : Dictionary is sticky, it will be used for all future compressed frames."]
    #[doc = "           To return to \"no-dictionary\" situation, load a NULL dictionary (or reset parameters)."]
    #[doc = "  Note 2 : Loading a dictionary involves building tables."]
    #[doc = "           It's also a CPU consuming operation, with non-negligible impact on latency."]
    #[doc = "           Tables are dependent on compression parameters, and for this reason,"]
    #[doc = "           compression parameters can no longer be changed after loading a dictionary."]
    #[doc = "  Note 3 :`dict` content will be copied internally."]
    #[doc = "           Use experimental ZSTD_CCtx_loadDictionary_byReference() to reference content instead."]
    #[doc = "           In such a case, dictionary buffer must outlive its users."]
    #[doc = "  Note 4 : Use ZSTD_CCtx_loadDictionary_advanced()"]
    #[doc = "           to precisely select how dictionary content must be interpreted."]
    pub fn ZSTD_CCtx_loadDictionary(
        cctx: *mut ZSTD_CCtx,
        dict: *const ::libc::c_void,
        dictSize: usize,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_CCtx_refCDict() :"]
    #[doc = "  Reference a prepared dictionary, to be used for all next compressed frames."]
    #[doc = "  Note that compression parameters are enforced from within CDict,"]
    #[doc = "  and supersede any compression parameter previously set within CCtx."]
    #[doc = "  The parameters ignored are labled as \"superseded-by-cdict\" in the ZSTD_cParameter enum docs."]
    #[doc = "  The ignored parameters will be used again if the CCtx is returned to no-dictionary mode."]
    #[doc = "  The dictionary will remain valid for future compressed frames using same CCtx."]
    #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
    #[doc = "  Special : Referencing a NULL CDict means \"return to no-dictionary mode\"."]
    #[doc = "  Note 1 : Currently, only one dictionary can be managed."]
    #[doc = "           Referencing a new dictionary effectively \"discards\" any previous one."]
    #[doc = "  Note 2 : CDict is just referenced, its lifetime must outlive its usage within CCtx."]
    pub fn ZSTD_CCtx_refCDict(
        cctx: *mut ZSTD_CCtx,
        cdict: *const ZSTD_CDict,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_CCtx_refPrefix() :"]
    #[doc = "  Reference a prefix (single-usage dictionary) for next compressed frame."]
    #[doc = "  A prefix is **only used once**. Tables are discarded at end of frame (ZSTD_e_end)."]
    #[doc = "  Decompression will need same prefix to properly regenerate data."]
    #[doc = "  Compressing with a prefix is similar in outcome as performing a diff and compressing it,"]
    #[doc = "  but performs much faster, especially during decompression (compression speed is tunable with compression level)."]
    #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
    #[doc = "  Special: Adding any prefix (including NULL) invalidates any previous prefix or dictionary"]
    #[doc = "  Note 1 : Prefix buffer is referenced. It **must** outlive compression."]
    #[doc = "           Its content must remain unmodified during compression."]
    #[doc = "  Note 2 : If the intention is to diff some large src data blob with some prior version of itself,"]
    #[doc = "           ensure that the window size is large enough to contain the entire source."]
    #[doc = "           See ZSTD_c_windowLog."]
    #[doc = "  Note 3 : Referencing a prefix involves building tables, which are dependent on compression parameters."]
    #[doc = "           It's a CPU consuming operation, with non-negligible impact on latency."]
    #[doc = "           If there is a need to use the same prefix multiple times, consider loadDictionary instead."]
    #[doc = "  Note 4 : By default, the prefix is interpreted as raw content (ZSTD_dm_rawContent)."]
    #[doc = "           Use experimental ZSTD_CCtx_refPrefix_advanced() to alter dictionary interpretation."]
    pub fn ZSTD_CCtx_refPrefix(
        cctx: *mut ZSTD_CCtx,
        prefix: *const ::libc::c_void,
        prefixSize: usize,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_DCtx_loadDictionary() :"]
    #[doc = "  Create an internal DDict from dict buffer,"]
    #[doc = "  to be used to decompress next frames."]
    #[doc = "  The dictionary remains valid for all future frames, until explicitly invalidated."]
    #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
    #[doc = "  Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary,"]
    #[doc = "            meaning \"return to no-dictionary mode\"."]
    #[doc = "  Note 1 : Loading a dictionary involves building tables,"]
    #[doc = "           which has a non-negligible impact on CPU usage and latency."]
    #[doc = "           It's recommended to \"load once, use many times\", to amortize the cost"]
    #[doc = "  Note 2 :`dict` content will be copied internally, so `dict` can be released after loading."]
    #[doc = "           Use ZSTD_DCtx_loadDictionary_byReference() to reference dictionary content instead."]
    #[doc = "  Note 3 : Use ZSTD_DCtx_loadDictionary_advanced() to take control of"]
    #[doc = "           how dictionary content is loaded and interpreted."]
    pub fn ZSTD_DCtx_loadDictionary(
        dctx: *mut ZSTD_DCtx,
        dict: *const ::libc::c_void,
        dictSize: usize,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_DCtx_refDDict() :"]
    #[doc = "  Reference a prepared dictionary, to be used to decompress next frames."]
    #[doc = "  The dictionary remains active for decompression of future frames using same DCtx."]
    #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
    #[doc = "  Note 1 : Currently, only one dictionary can be managed."]
    #[doc = "           Referencing a new dictionary effectively \"discards\" any previous one."]
    #[doc = "  Special: referencing a NULL DDict means \"return to no-dictionary mode\"."]
    #[doc = "  Note 2 : DDict is just referenced, its lifetime must outlive its usage from DCtx."]
    pub fn ZSTD_DCtx_refDDict(
        dctx: *mut ZSTD_DCtx,
        ddict: *const ZSTD_DDict,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_DCtx_refPrefix() :"]
    #[doc = "  Reference a prefix (single-usage dictionary) to decompress next frame."]
    #[doc = "  This is the reverse operation of ZSTD_CCtx_refPrefix(),"]
    #[doc = "  and must use the same prefix as the one used during compression."]
    #[doc = "  Prefix is **only used once**. Reference is discarded at end of frame."]
    #[doc = "  End of frame is reached when ZSTD_decompressStream() returns 0."]
    #[doc = " @result : 0, or an error code (which can be tested with ZSTD_isError())."]
    #[doc = "  Note 1 : Adding any prefix (including NULL) invalidates any previously set prefix or dictionary"]
    #[doc = "  Note 2 : Prefix buffer is referenced. It **must** outlive decompression."]
    #[doc = "           Prefix buffer must remain unmodified up to the end of frame,"]
    #[doc = "           reached when ZSTD_decompressStream() returns 0."]
    #[doc = "  Note 3 : By default, the prefix is treated as raw content (ZSTD_dm_rawContent)."]
    #[doc = "           Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode (Experimental section)"]
    #[doc = "  Note 4 : Referencing a raw content prefix has almost no cpu nor memory cost."]
    #[doc = "           A full dictionary is more costly, as it requires building tables."]
    pub fn ZSTD_DCtx_refPrefix(
        dctx: *mut ZSTD_DCtx,
        prefix: *const ::libc::c_void,
        prefixSize: usize,
    ) -> usize;
}
extern "C" {
    #[doc = " ZSTD_sizeof_*() :"]
    #[doc = "  These functions give the _current_ memory usage of selected object."]
    #[doc = "  Note that object memory usage can evolve (increase or decrease) over time."]
    pub fn ZSTD_sizeof_CCtx(cctx: *const ZSTD_CCtx) -> usize;
}
extern "C" {
    pub fn ZSTD_sizeof_DCtx(dctx: *const ZSTD_DCtx) -> usize;
}
extern "C" {
    pub fn ZSTD_sizeof_CStream(zcs: *const ZSTD_CStream) -> usize;
}
extern "C" {
    pub fn ZSTD_sizeof_DStream(zds: *const ZSTD_DStream) -> usize;
}
extern "C" {
    pub fn ZSTD_sizeof_CDict(cdict: *const ZSTD_CDict) -> usize;
}
extern "C" {
    pub fn ZSTD_sizeof_DDict(ddict: *const ZSTD_DDict) -> usize;
}
extern "C" {
    #[doc = " ZDICT_trainFromBuffer():"]
    #[doc = "  Train a dictionary from an array of samples."]
    #[doc = "  Redirect towards ZDICT_optimizeTrainFromBuffer_fastCover() single-threaded, with d=8, steps=4,"]
    #[doc = "  f=20, and accel=1."]
    #[doc = "  Samples must be stored concatenated in a single flat buffer `samplesBuffer`,"]
    #[doc = "  supplied with an array of sizes `samplesSizes`, providing the size of each sample, in order."]
    #[doc = "  The resulting dictionary will be saved into `dictBuffer`."]
    #[doc = " @return: size of dictionary stored into `dictBuffer` (<= `dictBufferCapacity`)"]
    #[doc = "          or an error code, which can be tested with ZDICT_isError()."]
    #[doc = "  Note:  Dictionary training will fail if there are not enough samples to construct a"]
    #[doc = "         dictionary, or if most of the samples are too small (< 8 bytes being the lower limit)."]
    #[doc = "         If dictionary training fails, you should use zstd without a dictionary, as the dictionary"]
    #[doc = "         would've been ineffective anyways. If you believe your samples would benefit from a dictionary"]
    #[doc = "         please open an issue with details, and we can look into it."]
    #[doc = "  Note: ZDICT_trainFromBuffer()'s memory usage is about 6 MB."]
    #[doc = "  Tips: In general, a reasonable dictionary has a size of ~ 100 KB."]
    #[doc = "        It's possible to select smaller or larger size, just by specifying `dictBufferCapacity`."]
    #[doc = "        In general, it's recommended to provide a few thousands samples, though this can vary a lot."]
    #[doc = "        It's recommended that total size of all samples be about ~x100 times the target size of dictionary."]
    pub fn ZDICT_trainFromBuffer(
        dictBuffer: *mut ::libc::c_void,
        dictBufferCapacity: usize,
        samplesBuffer: *const ::libc::c_void,
        samplesSizes: *const usize,
        nbSamples: ::libc::c_uint,
    ) -> usize;
}
extern "C" {
    pub fn ZDICT_getDictID(
        dictBuffer: *const ::libc::c_void,
        dictSize: usize,
    ) -> ::libc::c_uint;
}
extern "C" {
    pub fn ZDICT_isError(errorCode: usize) -> ::libc::c_uint;
}
extern "C" {
    pub fn ZDICT_getErrorName(errorCode: usize) -> *const ::libc::c_char;
}