ppmd-sys 0.2.0

PPMd bindings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
/* automatically generated by rust-bindgen 0.71.1 */

pub const PPMD7_MIN_ORDER: u32 = 2;
pub const PPMD7_MAX_ORDER: u32 = 64;
pub const PPMD7_MIN_MEM_SIZE: u32 = 2048;
pub const PPMD7_MAX_MEM_SIZE: u32 = 4294967259;
pub const PPMD7_SYM_END: i32 = -1;
pub const PPMD7_SYM_ERROR: i32 = -2;
pub const PPMD8_MIN_ORDER: u32 = 2;
pub const PPMD8_MAX_ORDER: u32 = 16;
pub const PPMD8_SYM_END: i32 = -1;
pub const PPMD8_SYM_ERROR: i32 = -2;
pub type Byte = ::std::os::raw::c_uchar;
pub type UInt16 = ::std::os::raw::c_ushort;
pub type Int32 = ::std::os::raw::c_int;
pub type UInt32 = ::std::os::raw::c_uint;
pub type UInt64 = u64;
pub type BoolInt = ::std::os::raw::c_int;
pub type IByteInPtr = *const IByteIn_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IByteIn_ {
    pub Read: ::std::option::Option<unsafe extern "C" fn(p: IByteInPtr) -> Byte>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IByteIn_"][::std::mem::size_of::<IByteIn_>() - 8usize];
    ["Alignment of IByteIn_"][::std::mem::align_of::<IByteIn_>() - 8usize];
    ["Offset of field: IByteIn_::Read"][::std::mem::offset_of!(IByteIn_, Read) - 0usize];
};
pub type IByteOutPtr = *const IByteOut_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IByteOut_ {
    pub Write: ::std::option::Option<unsafe extern "C" fn(p: IByteOutPtr, b: Byte)>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IByteOut_"][::std::mem::size_of::<IByteOut_>() - 8usize];
    ["Alignment of IByteOut_"][::std::mem::align_of::<IByteOut_>() - 8usize];
    ["Offset of field: IByteOut_::Write"][::std::mem::offset_of!(IByteOut_, Write) - 0usize];
};
pub type ISzAllocPtr = *const ISzAlloc;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ISzAlloc {
    pub Alloc: ::std::option::Option<
        unsafe extern "C" fn(p: ISzAllocPtr, size: usize) -> *mut ::std::os::raw::c_void,
    >,
    pub Free: ::std::option::Option<
        unsafe extern "C" fn(p: ISzAllocPtr, address: *mut ::std::os::raw::c_void),
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ISzAlloc"][::std::mem::size_of::<ISzAlloc>() - 16usize];
    ["Alignment of ISzAlloc"][::std::mem::align_of::<ISzAlloc>() - 8usize];
    ["Offset of field: ISzAlloc::Alloc"][::std::mem::offset_of!(ISzAlloc, Alloc) - 0usize];
    ["Offset of field: ISzAlloc::Free"][::std::mem::offset_of!(ISzAlloc, Free) - 8usize];
};
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct CPpmd_See {
    pub Summ: UInt16,
    pub Shift: Byte,
    pub Count: Byte,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd_See"][::std::mem::size_of::<CPpmd_See>() - 4usize];
    ["Alignment of CPpmd_See"][::std::mem::align_of::<CPpmd_See>() - 1usize];
    ["Offset of field: CPpmd_See::Summ"][::std::mem::offset_of!(CPpmd_See, Summ) - 0usize];
    ["Offset of field: CPpmd_See::Shift"][::std::mem::offset_of!(CPpmd_See, Shift) - 2usize];
    ["Offset of field: CPpmd_See::Count"][::std::mem::offset_of!(CPpmd_See, Count) - 3usize];
};
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct CPpmd_State {
    pub Symbol: Byte,
    pub Freq: Byte,
    pub Successor_0: UInt16,
    pub Successor_1: UInt16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd_State"][::std::mem::size_of::<CPpmd_State>() - 6usize];
    ["Alignment of CPpmd_State"][::std::mem::align_of::<CPpmd_State>() - 1usize];
    ["Offset of field: CPpmd_State::Symbol"][::std::mem::offset_of!(CPpmd_State, Symbol) - 0usize];
    ["Offset of field: CPpmd_State::Freq"][::std::mem::offset_of!(CPpmd_State, Freq) - 1usize];
    ["Offset of field: CPpmd_State::Successor_0"]
        [::std::mem::offset_of!(CPpmd_State, Successor_0) - 2usize];
    ["Offset of field: CPpmd_State::Successor_1"]
        [::std::mem::offset_of!(CPpmd_State, Successor_1) - 4usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CPpmd_State2_ {
    pub Symbol: Byte,
    pub Freq: Byte,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd_State2_"][::std::mem::size_of::<CPpmd_State2_>() - 2usize];
    ["Alignment of CPpmd_State2_"][::std::mem::align_of::<CPpmd_State2_>() - 1usize];
    ["Offset of field: CPpmd_State2_::Symbol"]
        [::std::mem::offset_of!(CPpmd_State2_, Symbol) - 0usize];
    ["Offset of field: CPpmd_State2_::Freq"][::std::mem::offset_of!(CPpmd_State2_, Freq) - 1usize];
};
pub type CPpmd_State2 = CPpmd_State2_;
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct CPpmd_State4_ {
    pub Successor_0: UInt16,
    pub Successor_1: UInt16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd_State4_"][::std::mem::size_of::<CPpmd_State4_>() - 4usize];
    ["Alignment of CPpmd_State4_"][::std::mem::align_of::<CPpmd_State4_>() - 1usize];
    ["Offset of field: CPpmd_State4_::Successor_0"]
        [::std::mem::offset_of!(CPpmd_State4_, Successor_0) - 0usize];
    ["Offset of field: CPpmd_State4_::Successor_1"]
        [::std::mem::offset_of!(CPpmd_State4_, Successor_1) - 2usize];
};
pub type CPpmd_State4 = CPpmd_State4_;
pub type CPpmd_State_Ref = UInt32;
pub type CPpmd_Void_Ref = UInt32;
pub type CPpmd7_Context_Ref = UInt32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CPpmd7_Context_ {
    pub NumStats: UInt16,
    pub Union2: CPpmd7_Context___bindgen_ty_1,
    pub Union4: CPpmd7_Context___bindgen_ty_2,
    pub Suffix: CPpmd7_Context_Ref,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPpmd7_Context___bindgen_ty_1 {
    pub SummFreq: UInt16,
    pub State2: CPpmd_State2,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd7_Context___bindgen_ty_1"]
        [::std::mem::size_of::<CPpmd7_Context___bindgen_ty_1>() - 2usize];
    ["Alignment of CPpmd7_Context___bindgen_ty_1"]
        [::std::mem::align_of::<CPpmd7_Context___bindgen_ty_1>() - 2usize];
    ["Offset of field: CPpmd7_Context___bindgen_ty_1::SummFreq"]
        [::std::mem::offset_of!(CPpmd7_Context___bindgen_ty_1, SummFreq) - 0usize];
    ["Offset of field: CPpmd7_Context___bindgen_ty_1::State2"]
        [::std::mem::offset_of!(CPpmd7_Context___bindgen_ty_1, State2) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPpmd7_Context___bindgen_ty_2 {
    pub Stats: CPpmd_State_Ref,
    pub State4: CPpmd_State4,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd7_Context___bindgen_ty_2"]
        [::std::mem::size_of::<CPpmd7_Context___bindgen_ty_2>() - 4usize];
    ["Alignment of CPpmd7_Context___bindgen_ty_2"]
        [::std::mem::align_of::<CPpmd7_Context___bindgen_ty_2>() - 4usize];
    ["Offset of field: CPpmd7_Context___bindgen_ty_2::Stats"]
        [::std::mem::offset_of!(CPpmd7_Context___bindgen_ty_2, Stats) - 0usize];
    ["Offset of field: CPpmd7_Context___bindgen_ty_2::State4"]
        [::std::mem::offset_of!(CPpmd7_Context___bindgen_ty_2, State4) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd7_Context_"][::std::mem::size_of::<CPpmd7_Context_>() - 12usize];
    ["Alignment of CPpmd7_Context_"][::std::mem::align_of::<CPpmd7_Context_>() - 4usize];
    ["Offset of field: CPpmd7_Context_::NumStats"]
        [::std::mem::offset_of!(CPpmd7_Context_, NumStats) - 0usize];
    ["Offset of field: CPpmd7_Context_::Union2"]
        [::std::mem::offset_of!(CPpmd7_Context_, Union2) - 2usize];
    ["Offset of field: CPpmd7_Context_::Union4"]
        [::std::mem::offset_of!(CPpmd7_Context_, Union4) - 4usize];
    ["Offset of field: CPpmd7_Context_::Suffix"]
        [::std::mem::offset_of!(CPpmd7_Context_, Suffix) - 8usize];
};
pub type CPpmd7_Context = CPpmd7_Context_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CPpmd7_RangeDec {
    pub Range: UInt32,
    pub Code: UInt32,
    pub Low: UInt32,
    pub Stream: IByteInPtr,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd7_RangeDec"][::std::mem::size_of::<CPpmd7_RangeDec>() - 24usize];
    ["Alignment of CPpmd7_RangeDec"][::std::mem::align_of::<CPpmd7_RangeDec>() - 8usize];
    ["Offset of field: CPpmd7_RangeDec::Range"]
        [::std::mem::offset_of!(CPpmd7_RangeDec, Range) - 0usize];
    ["Offset of field: CPpmd7_RangeDec::Code"]
        [::std::mem::offset_of!(CPpmd7_RangeDec, Code) - 4usize];
    ["Offset of field: CPpmd7_RangeDec::Low"]
        [::std::mem::offset_of!(CPpmd7_RangeDec, Low) - 8usize];
    ["Offset of field: CPpmd7_RangeDec::Stream"]
        [::std::mem::offset_of!(CPpmd7_RangeDec, Stream) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CPpmd7z_RangeEnc {
    pub Range: UInt32,
    pub Cache: Byte,
    pub Low: UInt64,
    pub CacheSize: UInt64,
    pub Stream: IByteOutPtr,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd7z_RangeEnc"][::std::mem::size_of::<CPpmd7z_RangeEnc>() - 32usize];
    ["Alignment of CPpmd7z_RangeEnc"][::std::mem::align_of::<CPpmd7z_RangeEnc>() - 8usize];
    ["Offset of field: CPpmd7z_RangeEnc::Range"]
        [::std::mem::offset_of!(CPpmd7z_RangeEnc, Range) - 0usize];
    ["Offset of field: CPpmd7z_RangeEnc::Cache"]
        [::std::mem::offset_of!(CPpmd7z_RangeEnc, Cache) - 4usize];
    ["Offset of field: CPpmd7z_RangeEnc::Low"]
        [::std::mem::offset_of!(CPpmd7z_RangeEnc, Low) - 8usize];
    ["Offset of field: CPpmd7z_RangeEnc::CacheSize"]
        [::std::mem::offset_of!(CPpmd7z_RangeEnc, CacheSize) - 16usize];
    ["Offset of field: CPpmd7z_RangeEnc::Stream"]
        [::std::mem::offset_of!(CPpmd7z_RangeEnc, Stream) - 24usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CPpmd7 {
    pub MinContext: *mut CPpmd7_Context,
    pub MaxContext: *mut CPpmd7_Context,
    pub FoundState: *mut CPpmd_State,
    pub OrderFall: ::std::os::raw::c_uint,
    pub InitEsc: ::std::os::raw::c_uint,
    pub PrevSuccess: ::std::os::raw::c_uint,
    pub MaxOrder: ::std::os::raw::c_uint,
    pub HiBitsFlag: ::std::os::raw::c_uint,
    pub RunLength: Int32,
    pub InitRL: Int32,
    pub Size: UInt32,
    pub GlueCount: UInt32,
    pub AlignOffset: UInt32,
    pub Base: *mut Byte,
    pub LoUnit: *mut Byte,
    pub HiUnit: *mut Byte,
    pub Text: *mut Byte,
    pub UnitsStart: *mut Byte,
    pub rc: CPpmd7__bindgen_ty_1,
    pub Indx2Units: [Byte; 40usize],
    pub Units2Indx: [Byte; 128usize],
    pub FreeList: [CPpmd_Void_Ref; 38usize],
    pub NS2BSIndx: [Byte; 256usize],
    pub NS2Indx: [Byte; 256usize],
    pub ExpEscape: [Byte; 16usize],
    pub DummySee: CPpmd_See,
    pub See: [[CPpmd_See; 16usize]; 25usize],
    pub BinSumm: [[UInt16; 64usize]; 128usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPpmd7__bindgen_ty_1 {
    pub dec: CPpmd7_RangeDec,
    pub enc: CPpmd7z_RangeEnc,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd7__bindgen_ty_1"][::std::mem::size_of::<CPpmd7__bindgen_ty_1>() - 32usize];
    ["Alignment of CPpmd7__bindgen_ty_1"][::std::mem::align_of::<CPpmd7__bindgen_ty_1>() - 8usize];
    ["Offset of field: CPpmd7__bindgen_ty_1::dec"]
        [::std::mem::offset_of!(CPpmd7__bindgen_ty_1, dec) - 0usize];
    ["Offset of field: CPpmd7__bindgen_ty_1::enc"]
        [::std::mem::offset_of!(CPpmd7__bindgen_ty_1, enc) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd7"][::std::mem::size_of::<CPpmd7>() - 18976usize];
    ["Alignment of CPpmd7"][::std::mem::align_of::<CPpmd7>() - 8usize];
    ["Offset of field: CPpmd7::MinContext"][::std::mem::offset_of!(CPpmd7, MinContext) - 0usize];
    ["Offset of field: CPpmd7::MaxContext"][::std::mem::offset_of!(CPpmd7, MaxContext) - 8usize];
    ["Offset of field: CPpmd7::FoundState"][::std::mem::offset_of!(CPpmd7, FoundState) - 16usize];
    ["Offset of field: CPpmd7::OrderFall"][::std::mem::offset_of!(CPpmd7, OrderFall) - 24usize];
    ["Offset of field: CPpmd7::InitEsc"][::std::mem::offset_of!(CPpmd7, InitEsc) - 28usize];
    ["Offset of field: CPpmd7::PrevSuccess"][::std::mem::offset_of!(CPpmd7, PrevSuccess) - 32usize];
    ["Offset of field: CPpmd7::MaxOrder"][::std::mem::offset_of!(CPpmd7, MaxOrder) - 36usize];
    ["Offset of field: CPpmd7::HiBitsFlag"][::std::mem::offset_of!(CPpmd7, HiBitsFlag) - 40usize];
    ["Offset of field: CPpmd7::RunLength"][::std::mem::offset_of!(CPpmd7, RunLength) - 44usize];
    ["Offset of field: CPpmd7::InitRL"][::std::mem::offset_of!(CPpmd7, InitRL) - 48usize];
    ["Offset of field: CPpmd7::Size"][::std::mem::offset_of!(CPpmd7, Size) - 52usize];
    ["Offset of field: CPpmd7::GlueCount"][::std::mem::offset_of!(CPpmd7, GlueCount) - 56usize];
    ["Offset of field: CPpmd7::AlignOffset"][::std::mem::offset_of!(CPpmd7, AlignOffset) - 60usize];
    ["Offset of field: CPpmd7::Base"][::std::mem::offset_of!(CPpmd7, Base) - 64usize];
    ["Offset of field: CPpmd7::LoUnit"][::std::mem::offset_of!(CPpmd7, LoUnit) - 72usize];
    ["Offset of field: CPpmd7::HiUnit"][::std::mem::offset_of!(CPpmd7, HiUnit) - 80usize];
    ["Offset of field: CPpmd7::Text"][::std::mem::offset_of!(CPpmd7, Text) - 88usize];
    ["Offset of field: CPpmd7::UnitsStart"][::std::mem::offset_of!(CPpmd7, UnitsStart) - 96usize];
    ["Offset of field: CPpmd7::rc"][::std::mem::offset_of!(CPpmd7, rc) - 104usize];
    ["Offset of field: CPpmd7::Indx2Units"][::std::mem::offset_of!(CPpmd7, Indx2Units) - 136usize];
    ["Offset of field: CPpmd7::Units2Indx"][::std::mem::offset_of!(CPpmd7, Units2Indx) - 176usize];
    ["Offset of field: CPpmd7::FreeList"][::std::mem::offset_of!(CPpmd7, FreeList) - 304usize];
    ["Offset of field: CPpmd7::NS2BSIndx"][::std::mem::offset_of!(CPpmd7, NS2BSIndx) - 456usize];
    ["Offset of field: CPpmd7::NS2Indx"][::std::mem::offset_of!(CPpmd7, NS2Indx) - 712usize];
    ["Offset of field: CPpmd7::ExpEscape"][::std::mem::offset_of!(CPpmd7, ExpEscape) - 968usize];
    ["Offset of field: CPpmd7::DummySee"][::std::mem::offset_of!(CPpmd7, DummySee) - 984usize];
    ["Offset of field: CPpmd7::See"][::std::mem::offset_of!(CPpmd7, See) - 988usize];
    ["Offset of field: CPpmd7::BinSumm"][::std::mem::offset_of!(CPpmd7, BinSumm) - 2588usize];
};
unsafe extern "C" {
    pub fn Ppmd7_Construct(p: *mut CPpmd7);
}
unsafe extern "C" {
    pub fn Ppmd7_Alloc(p: *mut CPpmd7, size: UInt32, alloc: ISzAllocPtr) -> BoolInt;
}
unsafe extern "C" {
    pub fn Ppmd7_Free(p: *mut CPpmd7, alloc: ISzAllocPtr);
}
unsafe extern "C" {
    pub fn Ppmd7_Init(p: *mut CPpmd7, maxOrder: ::std::os::raw::c_uint);
}
unsafe extern "C" {
    pub fn Ppmd7_Update1(p: *mut CPpmd7);
}
unsafe extern "C" {
    pub fn Ppmd7_Update1_0(p: *mut CPpmd7);
}
unsafe extern "C" {
    pub fn Ppmd7_Update2(p: *mut CPpmd7);
}
unsafe extern "C" {
    pub fn Ppmd7_MakeEscFreq(
        p: *mut CPpmd7,
        numMasked: ::std::os::raw::c_uint,
        scale: *mut UInt32,
    ) -> *mut CPpmd_See;
}
unsafe extern "C" {
    pub fn Ppmd7a_RangeDec_Init(p: *mut CPpmd7_RangeDec) -> BoolInt;
}
unsafe extern "C" {
    pub fn Ppmd7a_DecodeSymbol(p: *mut CPpmd7) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn Ppmd7z_RangeDec_Init(p: *mut CPpmd7_RangeDec) -> BoolInt;
}
unsafe extern "C" {
    pub fn Ppmd7z_DecodeSymbol(p: *mut CPpmd7) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn Ppmd7z_Init_RangeEnc(p: *mut CPpmd7);
}
unsafe extern "C" {
    pub fn Ppmd7z_Flush_RangeEnc(p: *mut CPpmd7);
}
unsafe extern "C" {
    pub fn Ppmd7z_EncodeSymbols(p: *mut CPpmd7, buf: *const Byte, lim: *const Byte);
}
pub type CPpmd8_Context_Ref = UInt32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CPpmd8_Context_ {
    pub NumStats: Byte,
    pub Flags: Byte,
    pub Union2: CPpmd8_Context___bindgen_ty_1,
    pub Union4: CPpmd8_Context___bindgen_ty_2,
    pub Suffix: CPpmd8_Context_Ref,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPpmd8_Context___bindgen_ty_1 {
    pub SummFreq: UInt16,
    pub State2: CPpmd_State2,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd8_Context___bindgen_ty_1"]
        [::std::mem::size_of::<CPpmd8_Context___bindgen_ty_1>() - 2usize];
    ["Alignment of CPpmd8_Context___bindgen_ty_1"]
        [::std::mem::align_of::<CPpmd8_Context___bindgen_ty_1>() - 2usize];
    ["Offset of field: CPpmd8_Context___bindgen_ty_1::SummFreq"]
        [::std::mem::offset_of!(CPpmd8_Context___bindgen_ty_1, SummFreq) - 0usize];
    ["Offset of field: CPpmd8_Context___bindgen_ty_1::State2"]
        [::std::mem::offset_of!(CPpmd8_Context___bindgen_ty_1, State2) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPpmd8_Context___bindgen_ty_2 {
    pub Stats: CPpmd_State_Ref,
    pub State4: CPpmd_State4,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd8_Context___bindgen_ty_2"]
        [::std::mem::size_of::<CPpmd8_Context___bindgen_ty_2>() - 4usize];
    ["Alignment of CPpmd8_Context___bindgen_ty_2"]
        [::std::mem::align_of::<CPpmd8_Context___bindgen_ty_2>() - 4usize];
    ["Offset of field: CPpmd8_Context___bindgen_ty_2::Stats"]
        [::std::mem::offset_of!(CPpmd8_Context___bindgen_ty_2, Stats) - 0usize];
    ["Offset of field: CPpmd8_Context___bindgen_ty_2::State4"]
        [::std::mem::offset_of!(CPpmd8_Context___bindgen_ty_2, State4) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd8_Context_"][::std::mem::size_of::<CPpmd8_Context_>() - 12usize];
    ["Alignment of CPpmd8_Context_"][::std::mem::align_of::<CPpmd8_Context_>() - 4usize];
    ["Offset of field: CPpmd8_Context_::NumStats"]
        [::std::mem::offset_of!(CPpmd8_Context_, NumStats) - 0usize];
    ["Offset of field: CPpmd8_Context_::Flags"]
        [::std::mem::offset_of!(CPpmd8_Context_, Flags) - 1usize];
    ["Offset of field: CPpmd8_Context_::Union2"]
        [::std::mem::offset_of!(CPpmd8_Context_, Union2) - 2usize];
    ["Offset of field: CPpmd8_Context_::Union4"]
        [::std::mem::offset_of!(CPpmd8_Context_, Union4) - 4usize];
    ["Offset of field: CPpmd8_Context_::Suffix"]
        [::std::mem::offset_of!(CPpmd8_Context_, Suffix) - 8usize];
};
pub type CPpmd8_Context = CPpmd8_Context_;
pub const PPMD8_RESTORE_METHOD_RESTART: _bindgen_ty_1 = 0;
pub const PPMD8_RESTORE_METHOD_CUT_OFF: _bindgen_ty_1 = 1;
pub const PPMD8_RESTORE_METHOD_UNSUPPPORTED: _bindgen_ty_1 = 2;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CPpmd8 {
    pub MinContext: *mut CPpmd8_Context,
    pub MaxContext: *mut CPpmd8_Context,
    pub FoundState: *mut CPpmd_State,
    pub OrderFall: ::std::os::raw::c_uint,
    pub InitEsc: ::std::os::raw::c_uint,
    pub PrevSuccess: ::std::os::raw::c_uint,
    pub MaxOrder: ::std::os::raw::c_uint,
    pub RestoreMethod: ::std::os::raw::c_uint,
    pub RunLength: Int32,
    pub InitRL: Int32,
    pub Size: UInt32,
    pub GlueCount: UInt32,
    pub AlignOffset: UInt32,
    pub Base: *mut Byte,
    pub LoUnit: *mut Byte,
    pub HiUnit: *mut Byte,
    pub Text: *mut Byte,
    pub UnitsStart: *mut Byte,
    pub Range: UInt32,
    pub Code: UInt32,
    pub Low: UInt32,
    pub Stream: CPpmd8__bindgen_ty_1,
    pub Indx2Units: [Byte; 40usize],
    pub Units2Indx: [Byte; 128usize],
    pub FreeList: [CPpmd_Void_Ref; 38usize],
    pub Stamps: [UInt32; 38usize],
    pub NS2BSIndx: [Byte; 256usize],
    pub NS2Indx: [Byte; 260usize],
    pub ExpEscape: [Byte; 16usize],
    pub DummySee: CPpmd_See,
    pub See: [[CPpmd_See; 32usize]; 24usize],
    pub BinSumm: [[UInt16; 64usize]; 25usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPpmd8__bindgen_ty_1 {
    pub In: IByteInPtr,
    pub Out: IByteOutPtr,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd8__bindgen_ty_1"][::std::mem::size_of::<CPpmd8__bindgen_ty_1>() - 8usize];
    ["Alignment of CPpmd8__bindgen_ty_1"][::std::mem::align_of::<CPpmd8__bindgen_ty_1>() - 8usize];
    ["Offset of field: CPpmd8__bindgen_ty_1::In"]
        [::std::mem::offset_of!(CPpmd8__bindgen_ty_1, In) - 0usize];
    ["Offset of field: CPpmd8__bindgen_ty_1::Out"]
        [::std::mem::offset_of!(CPpmd8__bindgen_ty_1, Out) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CPpmd8"][::std::mem::size_of::<CPpmd8>() - 7408usize];
    ["Alignment of CPpmd8"][::std::mem::align_of::<CPpmd8>() - 8usize];
    ["Offset of field: CPpmd8::MinContext"][::std::mem::offset_of!(CPpmd8, MinContext) - 0usize];
    ["Offset of field: CPpmd8::MaxContext"][::std::mem::offset_of!(CPpmd8, MaxContext) - 8usize];
    ["Offset of field: CPpmd8::FoundState"][::std::mem::offset_of!(CPpmd8, FoundState) - 16usize];
    ["Offset of field: CPpmd8::OrderFall"][::std::mem::offset_of!(CPpmd8, OrderFall) - 24usize];
    ["Offset of field: CPpmd8::InitEsc"][::std::mem::offset_of!(CPpmd8, InitEsc) - 28usize];
    ["Offset of field: CPpmd8::PrevSuccess"][::std::mem::offset_of!(CPpmd8, PrevSuccess) - 32usize];
    ["Offset of field: CPpmd8::MaxOrder"][::std::mem::offset_of!(CPpmd8, MaxOrder) - 36usize];
    ["Offset of field: CPpmd8::RestoreMethod"]
        [::std::mem::offset_of!(CPpmd8, RestoreMethod) - 40usize];
    ["Offset of field: CPpmd8::RunLength"][::std::mem::offset_of!(CPpmd8, RunLength) - 44usize];
    ["Offset of field: CPpmd8::InitRL"][::std::mem::offset_of!(CPpmd8, InitRL) - 48usize];
    ["Offset of field: CPpmd8::Size"][::std::mem::offset_of!(CPpmd8, Size) - 52usize];
    ["Offset of field: CPpmd8::GlueCount"][::std::mem::offset_of!(CPpmd8, GlueCount) - 56usize];
    ["Offset of field: CPpmd8::AlignOffset"][::std::mem::offset_of!(CPpmd8, AlignOffset) - 60usize];
    ["Offset of field: CPpmd8::Base"][::std::mem::offset_of!(CPpmd8, Base) - 64usize];
    ["Offset of field: CPpmd8::LoUnit"][::std::mem::offset_of!(CPpmd8, LoUnit) - 72usize];
    ["Offset of field: CPpmd8::HiUnit"][::std::mem::offset_of!(CPpmd8, HiUnit) - 80usize];
    ["Offset of field: CPpmd8::Text"][::std::mem::offset_of!(CPpmd8, Text) - 88usize];
    ["Offset of field: CPpmd8::UnitsStart"][::std::mem::offset_of!(CPpmd8, UnitsStart) - 96usize];
    ["Offset of field: CPpmd8::Range"][::std::mem::offset_of!(CPpmd8, Range) - 104usize];
    ["Offset of field: CPpmd8::Code"][::std::mem::offset_of!(CPpmd8, Code) - 108usize];
    ["Offset of field: CPpmd8::Low"][::std::mem::offset_of!(CPpmd8, Low) - 112usize];
    ["Offset of field: CPpmd8::Stream"][::std::mem::offset_of!(CPpmd8, Stream) - 120usize];
    ["Offset of field: CPpmd8::Indx2Units"][::std::mem::offset_of!(CPpmd8, Indx2Units) - 128usize];
    ["Offset of field: CPpmd8::Units2Indx"][::std::mem::offset_of!(CPpmd8, Units2Indx) - 168usize];
    ["Offset of field: CPpmd8::FreeList"][::std::mem::offset_of!(CPpmd8, FreeList) - 296usize];
    ["Offset of field: CPpmd8::Stamps"][::std::mem::offset_of!(CPpmd8, Stamps) - 448usize];
    ["Offset of field: CPpmd8::NS2BSIndx"][::std::mem::offset_of!(CPpmd8, NS2BSIndx) - 600usize];
    ["Offset of field: CPpmd8::NS2Indx"][::std::mem::offset_of!(CPpmd8, NS2Indx) - 856usize];
    ["Offset of field: CPpmd8::ExpEscape"][::std::mem::offset_of!(CPpmd8, ExpEscape) - 1116usize];
    ["Offset of field: CPpmd8::DummySee"][::std::mem::offset_of!(CPpmd8, DummySee) - 1132usize];
    ["Offset of field: CPpmd8::See"][::std::mem::offset_of!(CPpmd8, See) - 1136usize];
    ["Offset of field: CPpmd8::BinSumm"][::std::mem::offset_of!(CPpmd8, BinSumm) - 4208usize];
};
unsafe extern "C" {
    pub fn Ppmd8_Construct(p: *mut CPpmd8);
}
unsafe extern "C" {
    pub fn Ppmd8_Alloc(p: *mut CPpmd8, size: UInt32, alloc: ISzAllocPtr) -> BoolInt;
}
unsafe extern "C" {
    pub fn Ppmd8_Free(p: *mut CPpmd8, alloc: ISzAllocPtr);
}
unsafe extern "C" {
    pub fn Ppmd8_Init(
        p: *mut CPpmd8,
        maxOrder: ::std::os::raw::c_uint,
        restoreMethod: ::std::os::raw::c_uint,
    );
}
unsafe extern "C" {
    pub fn Ppmd8_Update1(p: *mut CPpmd8);
}
unsafe extern "C" {
    pub fn Ppmd8_Update1_0(p: *mut CPpmd8);
}
unsafe extern "C" {
    pub fn Ppmd8_Update2(p: *mut CPpmd8);
}
unsafe extern "C" {
    pub fn Ppmd8_MakeEscFreq(
        p: *mut CPpmd8,
        numMasked: ::std::os::raw::c_uint,
        scale: *mut UInt32,
    ) -> *mut CPpmd_See;
}
unsafe extern "C" {
    pub fn Ppmd8_Init_RangeDec(p: *mut CPpmd8) -> BoolInt;
}
unsafe extern "C" {
    pub fn Ppmd8_DecodeSymbol(p: *mut CPpmd8) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn Ppmd8_Flush_RangeEnc(p: *mut CPpmd8);
}
unsafe extern "C" {
    pub fn Ppmd8_EncodeSymbol(p: *mut CPpmd8, symbol: ::std::os::raw::c_int);
}