pub const ZSTD_VERSION_MAJOR: u32 = 1;
pub const ZSTD_VERSION_MINOR: u32 = 3;
pub const ZSTD_VERSION_RELEASE: u32 = 4;
pub const ZSTD_VERSION_NUMBER: u32 = 10304;
pub const ZSTD_CONTENTSIZE_UNKNOWN: i32 = -1;
pub const ZSTD_CONTENTSIZE_ERROR: i32 = -2;
pub const ZSTD_MAGICNUMBER: u32 = 4247762216;
pub const ZSTD_MAGIC_SKIPPABLE_START: u32 = 407710288;
pub const ZSTD_MAGIC_DICTIONARY: u32 = 3962610743;
pub const ZSTD_WINDOWLOG_MAX_32: u32 = 30;
pub const ZSTD_WINDOWLOG_MAX_64: u32 = 31;
pub const ZSTD_WINDOWLOG_MIN: u32 = 10;
pub const ZSTD_HASHLOG_MIN: u32 = 6;
pub const ZSTD_CHAINLOG_MAX_32: u32 = 29;
pub const ZSTD_CHAINLOG_MAX_64: u32 = 30;
pub const ZSTD_CHAINLOG_MIN: u32 = 6;
pub const ZSTD_HASHLOG3_MAX: u32 = 17;
pub const ZSTD_SEARCHLOG_MIN: u32 = 1;
pub const ZSTD_SEARCHLENGTH_MAX: u32 = 7;
pub const ZSTD_SEARCHLENGTH_MIN: u32 = 3;
pub const ZSTD_TARGETLENGTH_MIN: u32 = 1;
pub const ZSTD_LDM_MINMATCH_MIN: u32 = 4;
pub const ZSTD_LDM_MINMATCH_MAX: u32 = 4096;
pub const ZSTD_LDM_BUCKETSIZELOG_MAX: u32 = 8;
pub const ZSTD_FRAMEHEADERSIZE_PREFIX: u32 = 5;
pub const ZSTD_FRAMEHEADERSIZE_MIN: u32 = 6;
pub const ZSTD_FRAMEHEADERSIZE_MAX: u32 = 18;
pub const ZSTD_BLOCKSIZELOG_MAX: u32 = 17;
pub const ZSTD_BLOCKSIZE_MAX: u32 = 131072;
pub const ZSTDMT_JOBSIZE_MIN: u32 = 1048576;
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" {
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" {
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" {
pub fn ZSTD_getDecompressedSize(
src: *const ::libc::c_void,
srcSize: usize,
) -> ::libc::c_ulonglong;
}
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_maxCLevel() -> ::libc::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_CCtx_s {
_unused: [u8; 0],
}
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" {
pub fn ZSTD_compressCCtx(
ctx: *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" {
pub fn ZSTD_decompressDCtx(
ctx: *mut ZSTD_DCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
src: *const ::libc::c_void,
srcSize: usize,
) -> usize;
}
extern "C" {
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" {
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],
}
pub type ZSTD_CDict = ZSTD_CDict_s;
extern "C" {
pub fn ZSTD_createCDict(
dictBuffer: *const ::libc::c_void,
dictSize: usize,
compressionLevel: ::libc::c_int,
) -> *mut ZSTD_CDict;
}
extern "C" {
pub fn ZSTD_freeCDict(CDict: *mut ZSTD_CDict) -> usize;
}
extern "C" {
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" {
pub fn ZSTD_createDDict(
dictBuffer: *const ::libc::c_void,
dictSize: usize,
) -> *mut ZSTD_DDict;
}
extern "C" {
pub fn ZSTD_freeDDict(ddict: *mut ZSTD_DDict) -> usize;
}
extern "C" {
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;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_inBuffer_s {
pub src: *const ::libc::c_void,
pub size: usize,
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 {
pub dst: *mut ::libc::c_void,
pub size: usize,
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;
}
extern "C" {
pub fn ZSTD_initCStream(
zcs: *mut ZSTD_CStream,
compressionLevel: ::libc::c_int,
) -> usize;
}
extern "C" {
pub fn ZSTD_compressStream(
zcs: *mut ZSTD_CStream,
output: *mut ZSTD_outBuffer,
input: *mut ZSTD_inBuffer,
) -> usize;
}
extern "C" {
pub fn ZSTD_flushStream(
zcs: *mut ZSTD_CStream,
output: *mut ZSTD_outBuffer,
) -> usize;
}
extern "C" {
pub fn ZSTD_endStream(
zcs: *mut ZSTD_CStream,
output: *mut ZSTD_outBuffer,
) -> usize;
}
extern "C" {
pub fn ZSTD_CStreamInSize() -> usize;
}
extern "C" {
pub fn ZSTD_CStreamOutSize() -> 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;
}
pub const ZSTD_frameHeaderSize_prefix: usize = 5;
pub const ZSTD_frameHeaderSize_min: usize = 6;
pub const ZSTD_frameHeaderSize_max: usize = 18;
pub const ZSTD_skippableHeaderSize: usize = 8;
pub const ZSTD_strategy_ZSTD_fast: ZSTD_strategy = 1;
pub const ZSTD_strategy_ZSTD_dfast: ZSTD_strategy = 2;
pub const ZSTD_strategy_ZSTD_greedy: ZSTD_strategy = 3;
pub const ZSTD_strategy_ZSTD_lazy: ZSTD_strategy = 4;
pub const ZSTD_strategy_ZSTD_lazy2: ZSTD_strategy = 5;
pub const ZSTD_strategy_ZSTD_btlazy2: ZSTD_strategy = 6;
pub const ZSTD_strategy_ZSTD_btopt: ZSTD_strategy = 7;
pub const ZSTD_strategy_ZSTD_btultra: ZSTD_strategy = 8;
pub type ZSTD_strategy = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_compressionParameters {
pub windowLog: ::libc::c_uint,
pub chainLog: ::libc::c_uint,
pub hashLog: ::libc::c_uint,
pub searchLog: ::libc::c_uint,
pub searchLength: ::libc::c_uint,
pub targetLength: ::libc::c_uint,
pub strategy: ZSTD_strategy,
}
#[test]
fn bindgen_test_layout_ZSTD_compressionParameters() {
assert_eq!(
::core::mem::size_of::<ZSTD_compressionParameters>(),
28usize,
concat!("Size of: ", stringify!(ZSTD_compressionParameters))
);
assert_eq!(
::core::mem::align_of::<ZSTD_compressionParameters>(),
4usize,
concat!("Alignment of ", stringify!(ZSTD_compressionParameters))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_compressionParameters>())).windowLog
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_compressionParameters),
"::",
stringify!(windowLog)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_compressionParameters>())).chainLog
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_compressionParameters),
"::",
stringify!(chainLog)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_compressionParameters>())).hashLog
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_compressionParameters),
"::",
stringify!(hashLog)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_compressionParameters>())).searchLog
as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_compressionParameters),
"::",
stringify!(searchLog)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_compressionParameters>()))
.searchLength as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_compressionParameters),
"::",
stringify!(searchLength)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_compressionParameters>()))
.targetLength as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_compressionParameters),
"::",
stringify!(targetLength)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_compressionParameters>())).strategy
as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_compressionParameters),
"::",
stringify!(strategy)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_frameParameters {
pub contentSizeFlag: ::libc::c_uint,
pub checksumFlag: ::libc::c_uint,
pub noDictIDFlag: ::libc::c_uint,
}
#[test]
fn bindgen_test_layout_ZSTD_frameParameters() {
assert_eq!(
::core::mem::size_of::<ZSTD_frameParameters>(),
12usize,
concat!("Size of: ", stringify!(ZSTD_frameParameters))
);
assert_eq!(
::core::mem::align_of::<ZSTD_frameParameters>(),
4usize,
concat!("Alignment of ", stringify!(ZSTD_frameParameters))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameParameters>())).contentSizeFlag
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameParameters),
"::",
stringify!(contentSizeFlag)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameParameters>())).checksumFlag
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameParameters),
"::",
stringify!(checksumFlag)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameParameters>())).noDictIDFlag
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameParameters),
"::",
stringify!(noDictIDFlag)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_parameters {
pub cParams: ZSTD_compressionParameters,
pub fParams: ZSTD_frameParameters,
}
#[test]
fn bindgen_test_layout_ZSTD_parameters() {
assert_eq!(
::core::mem::size_of::<ZSTD_parameters>(),
40usize,
concat!("Size of: ", stringify!(ZSTD_parameters))
);
assert_eq!(
::core::mem::align_of::<ZSTD_parameters>(),
4usize,
concat!("Alignment of ", stringify!(ZSTD_parameters))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_parameters>())).cParams as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_parameters),
"::",
stringify!(cParams)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_parameters>())).fParams as *const _
as usize
},
28usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_parameters),
"::",
stringify!(fParams)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_CCtx_params_s {
_unused: [u8; 0],
}
pub type ZSTD_CCtx_params = ZSTD_CCtx_params_s;
pub const ZSTD_dictContentType_e_ZSTD_dct_auto: ZSTD_dictContentType_e = 0;
pub const ZSTD_dictContentType_e_ZSTD_dct_rawContent: ZSTD_dictContentType_e =
1;
pub const ZSTD_dictContentType_e_ZSTD_dct_fullDict: ZSTD_dictContentType_e = 2;
pub type ZSTD_dictContentType_e = u32;
pub const ZSTD_dictLoadMethod_e_ZSTD_dlm_byCopy: ZSTD_dictLoadMethod_e = 0;
pub const ZSTD_dictLoadMethod_e_ZSTD_dlm_byRef: ZSTD_dictLoadMethod_e = 1;
pub type ZSTD_dictLoadMethod_e = u32;
extern "C" {
pub fn ZSTD_findFrameCompressedSize(
src: *const ::libc::c_void,
srcSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_findDecompressedSize(
src: *const ::libc::c_void,
srcSize: usize,
) -> ::libc::c_ulonglong;
}
extern "C" {
pub fn ZSTD_frameHeaderSize(
src: *const ::libc::c_void,
srcSize: usize,
) -> usize;
}
extern "C" {
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" {
pub fn ZSTD_estimateCCtxSize(compressionLevel: ::libc::c_int) -> usize;
}
extern "C" {
pub fn ZSTD_estimateCCtxSize_usingCParams(
cParams: ZSTD_compressionParameters,
) -> usize;
}
extern "C" {
pub fn ZSTD_estimateCCtxSize_usingCCtxParams(
params: *const ZSTD_CCtx_params,
) -> usize;
}
extern "C" {
pub fn ZSTD_estimateDCtxSize() -> usize;
}
extern "C" {
pub fn ZSTD_estimateCStreamSize(compressionLevel: ::libc::c_int) -> usize;
}
extern "C" {
pub fn ZSTD_estimateCStreamSize_usingCParams(
cParams: ZSTD_compressionParameters,
) -> usize;
}
extern "C" {
pub fn ZSTD_estimateCStreamSize_usingCCtxParams(
params: *const ZSTD_CCtx_params,
) -> usize;
}
extern "C" {
pub fn ZSTD_estimateDStreamSize(windowSize: usize) -> usize;
}
extern "C" {
pub fn ZSTD_estimateDStreamSize_fromFrame(
src: *const ::libc::c_void,
srcSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_estimateCDictSize(
dictSize: usize,
compressionLevel: ::libc::c_int,
) -> usize;
}
extern "C" {
pub fn ZSTD_estimateCDictSize_advanced(
dictSize: usize,
cParams: ZSTD_compressionParameters,
dictLoadMethod: ZSTD_dictLoadMethod_e,
) -> usize;
}
extern "C" {
pub fn ZSTD_estimateDDictSize(
dictSize: usize,
dictLoadMethod: ZSTD_dictLoadMethod_e,
) -> usize;
}
extern "C" {
pub fn ZSTD_initStaticCCtx(
workspace: *mut ::libc::c_void,
workspaceSize: usize,
) -> *mut ZSTD_CCtx;
}
extern "C" {
pub fn ZSTD_initStaticCStream(
workspace: *mut ::libc::c_void,
workspaceSize: usize,
) -> *mut ZSTD_CStream;
}
extern "C" {
pub fn ZSTD_initStaticDCtx(
workspace: *mut ::libc::c_void,
workspaceSize: usize,
) -> *mut ZSTD_DCtx;
}
extern "C" {
pub fn ZSTD_initStaticDStream(
workspace: *mut ::libc::c_void,
workspaceSize: usize,
) -> *mut ZSTD_DStream;
}
extern "C" {
pub fn ZSTD_initStaticCDict(
workspace: *mut ::libc::c_void,
workspaceSize: usize,
dict: *const ::libc::c_void,
dictSize: usize,
dictLoadMethod: ZSTD_dictLoadMethod_e,
dictContentType: ZSTD_dictContentType_e,
cParams: ZSTD_compressionParameters,
) -> *const ZSTD_CDict;
}
extern "C" {
pub fn ZSTD_initStaticDDict(
workspace: *mut ::libc::c_void,
workspaceSize: usize,
dict: *const ::libc::c_void,
dictSize: usize,
dictLoadMethod: ZSTD_dictLoadMethod_e,
dictContentType: ZSTD_dictContentType_e,
) -> *const ZSTD_DDict;
}
pub type ZSTD_allocFunction = ::core::option::Option<
unsafe extern "C" fn(opaque: *mut ::libc::c_void, size: usize)
-> *mut ::libc::c_void,
>;
pub type ZSTD_freeFunction = ::core::option::Option<
unsafe extern "C" fn(
opaque: *mut ::libc::c_void,
address: *mut ::libc::c_void,
),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_customMem {
pub customAlloc: ZSTD_allocFunction,
pub customFree: ZSTD_freeFunction,
pub opaque: *mut ::libc::c_void,
}
#[test]
fn bindgen_test_layout_ZSTD_customMem() {
assert_eq!(
::core::mem::size_of::<ZSTD_customMem>(),
24usize,
concat!("Size of: ", stringify!(ZSTD_customMem))
);
assert_eq!(
::core::mem::align_of::<ZSTD_customMem>(),
8usize,
concat!("Alignment of ", stringify!(ZSTD_customMem))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_customMem>())).customAlloc as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_customMem),
"::",
stringify!(customAlloc)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_customMem>())).customFree as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_customMem),
"::",
stringify!(customFree)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_customMem>())).opaque as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_customMem),
"::",
stringify!(opaque)
)
);
}
extern "C" {
#[link_name = "\u{1}ZSTD_defaultCMem"]
pub static mut ZSTD_defaultCMem: ZSTD_customMem;
}
extern "C" {
pub fn ZSTD_createCCtx_advanced(
customMem: ZSTD_customMem,
) -> *mut ZSTD_CCtx;
}
extern "C" {
pub fn ZSTD_createCStream_advanced(
customMem: ZSTD_customMem,
) -> *mut ZSTD_CStream;
}
extern "C" {
pub fn ZSTD_createDCtx_advanced(
customMem: ZSTD_customMem,
) -> *mut ZSTD_DCtx;
}
extern "C" {
pub fn ZSTD_createDStream_advanced(
customMem: ZSTD_customMem,
) -> *mut ZSTD_DStream;
}
extern "C" {
pub fn ZSTD_createCDict_advanced(
dict: *const ::libc::c_void,
dictSize: usize,
dictLoadMethod: ZSTD_dictLoadMethod_e,
dictContentType: ZSTD_dictContentType_e,
cParams: ZSTD_compressionParameters,
customMem: ZSTD_customMem,
) -> *mut ZSTD_CDict;
}
extern "C" {
pub fn ZSTD_createDDict_advanced(
dict: *const ::libc::c_void,
dictSize: usize,
dictLoadMethod: ZSTD_dictLoadMethod_e,
dictContentType: ZSTD_dictContentType_e,
customMem: ZSTD_customMem,
) -> *mut ZSTD_DDict;
}
extern "C" {
pub fn ZSTD_createCDict_byReference(
dictBuffer: *const ::libc::c_void,
dictSize: usize,
compressionLevel: ::libc::c_int,
) -> *mut ZSTD_CDict;
}
extern "C" {
pub fn ZSTD_getCParams(
compressionLevel: ::libc::c_int,
estimatedSrcSize: ::libc::c_ulonglong,
dictSize: usize,
) -> ZSTD_compressionParameters;
}
extern "C" {
pub fn ZSTD_getParams(
compressionLevel: ::libc::c_int,
estimatedSrcSize: ::libc::c_ulonglong,
dictSize: usize,
) -> ZSTD_parameters;
}
extern "C" {
pub fn ZSTD_checkCParams(params: ZSTD_compressionParameters) -> usize;
}
extern "C" {
pub fn ZSTD_adjustCParams(
cPar: ZSTD_compressionParameters,
srcSize: ::libc::c_ulonglong,
dictSize: usize,
) -> ZSTD_compressionParameters;
}
extern "C" {
pub fn ZSTD_compress_advanced(
cctx: *mut ZSTD_CCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
src: *const ::libc::c_void,
srcSize: usize,
dict: *const ::libc::c_void,
dictSize: usize,
params: ZSTD_parameters,
) -> usize;
}
extern "C" {
pub fn ZSTD_compress_usingCDict_advanced(
cctx: *mut ZSTD_CCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
src: *const ::libc::c_void,
srcSize: usize,
cdict: *const ZSTD_CDict,
fParams: ZSTD_frameParameters,
) -> usize;
}
extern "C" {
pub fn ZSTD_isFrame(
buffer: *const ::libc::c_void,
size: usize,
) -> ::libc::c_uint;
}
extern "C" {
pub fn ZSTD_createDDict_byReference(
dictBuffer: *const ::libc::c_void,
dictSize: usize,
) -> *mut ZSTD_DDict;
}
extern "C" {
pub fn ZSTD_getDictID_fromDict(
dict: *const ::libc::c_void,
dictSize: usize,
) -> ::libc::c_uint;
}
extern "C" {
pub fn ZSTD_getDictID_fromDDict(
ddict: *const ZSTD_DDict,
) -> ::libc::c_uint;
}
extern "C" {
pub fn ZSTD_getDictID_fromFrame(
src: *const ::libc::c_void,
srcSize: usize,
) -> ::libc::c_uint;
}
extern "C" {
pub fn ZSTD_initCStream_srcSize(
zcs: *mut ZSTD_CStream,
compressionLevel: ::libc::c_int,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}
extern "C" {
pub fn ZSTD_initCStream_usingDict(
zcs: *mut ZSTD_CStream,
dict: *const ::libc::c_void,
dictSize: usize,
compressionLevel: ::libc::c_int,
) -> usize;
}
extern "C" {
pub fn ZSTD_initCStream_advanced(
zcs: *mut ZSTD_CStream,
dict: *const ::libc::c_void,
dictSize: usize,
params: ZSTD_parameters,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}
extern "C" {
pub fn ZSTD_initCStream_usingCDict(
zcs: *mut ZSTD_CStream,
cdict: *const ZSTD_CDict,
) -> usize;
}
extern "C" {
pub fn ZSTD_initCStream_usingCDict_advanced(
zcs: *mut ZSTD_CStream,
cdict: *const ZSTD_CDict,
fParams: ZSTD_frameParameters,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}
extern "C" {
pub fn ZSTD_resetCStream(
zcs: *mut ZSTD_CStream,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_frameProgression {
pub ingested: ::libc::c_ulonglong,
pub consumed: ::libc::c_ulonglong,
pub produced: ::libc::c_ulonglong,
}
#[test]
fn bindgen_test_layout_ZSTD_frameProgression() {
assert_eq!(
::core::mem::size_of::<ZSTD_frameProgression>(),
24usize,
concat!("Size of: ", stringify!(ZSTD_frameProgression))
);
assert_eq!(
::core::mem::align_of::<ZSTD_frameProgression>(),
8usize,
concat!("Alignment of ", stringify!(ZSTD_frameProgression))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameProgression>())).ingested
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameProgression),
"::",
stringify!(ingested)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameProgression>())).consumed
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameProgression),
"::",
stringify!(consumed)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameProgression>())).produced
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameProgression),
"::",
stringify!(produced)
)
);
}
extern "C" {
pub fn ZSTD_getFrameProgression(
cctx: *const ZSTD_CCtx,
) -> ZSTD_frameProgression;
}
pub const ZSTD_DStreamParameter_e_DStream_p_maxWindowSize:
ZSTD_DStreamParameter_e = 0;
pub type ZSTD_DStreamParameter_e = u32;
extern "C" {
pub fn ZSTD_setDStreamParameter(
zds: *mut ZSTD_DStream,
paramType: ZSTD_DStreamParameter_e,
paramValue: ::libc::c_uint,
) -> usize;
}
extern "C" {
pub fn ZSTD_initDStream_usingDict(
zds: *mut ZSTD_DStream,
dict: *const ::libc::c_void,
dictSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_initDStream_usingDDict(
zds: *mut ZSTD_DStream,
ddict: *const ZSTD_DDict,
) -> usize;
}
extern "C" {
pub fn ZSTD_resetDStream(zds: *mut ZSTD_DStream) -> usize;
}
extern "C" {
pub fn ZSTD_compressBegin(
cctx: *mut ZSTD_CCtx,
compressionLevel: ::libc::c_int,
) -> usize;
}
extern "C" {
pub fn ZSTD_compressBegin_usingDict(
cctx: *mut ZSTD_CCtx,
dict: *const ::libc::c_void,
dictSize: usize,
compressionLevel: ::libc::c_int,
) -> usize;
}
extern "C" {
pub fn ZSTD_compressBegin_advanced(
cctx: *mut ZSTD_CCtx,
dict: *const ::libc::c_void,
dictSize: usize,
params: ZSTD_parameters,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}
extern "C" {
pub fn ZSTD_compressBegin_usingCDict(
cctx: *mut ZSTD_CCtx,
cdict: *const ZSTD_CDict,
) -> usize;
}
extern "C" {
pub fn ZSTD_compressBegin_usingCDict_advanced(
cctx: *const ZSTD_CCtx,
cdict: *const ZSTD_CDict,
fParams: ZSTD_frameParameters,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}
extern "C" {
pub fn ZSTD_copyCCtx(
cctx: *mut ZSTD_CCtx,
preparedCCtx: *const ZSTD_CCtx,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}
extern "C" {
pub fn ZSTD_compressContinue(
cctx: *mut ZSTD_CCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
src: *const ::libc::c_void,
srcSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_compressEnd(
cctx: *mut ZSTD_CCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
src: *const ::libc::c_void,
srcSize: usize,
) -> usize;
}
pub const ZSTD_frameType_e_ZSTD_frame: ZSTD_frameType_e = 0;
pub const ZSTD_frameType_e_ZSTD_skippableFrame: ZSTD_frameType_e = 1;
pub type ZSTD_frameType_e = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTD_frameHeader {
pub frameContentSize: ::libc::c_ulonglong,
pub windowSize: ::libc::c_ulonglong,
pub blockSizeMax: ::libc::c_uint,
pub frameType: ZSTD_frameType_e,
pub headerSize: ::libc::c_uint,
pub dictID: ::libc::c_uint,
pub checksumFlag: ::libc::c_uint,
}
#[test]
fn bindgen_test_layout_ZSTD_frameHeader() {
assert_eq!(
::core::mem::size_of::<ZSTD_frameHeader>(),
40usize,
concat!("Size of: ", stringify!(ZSTD_frameHeader))
);
assert_eq!(
::core::mem::align_of::<ZSTD_frameHeader>(),
8usize,
concat!("Alignment of ", stringify!(ZSTD_frameHeader))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameHeader>())).frameContentSize
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameHeader),
"::",
stringify!(frameContentSize)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameHeader>())).windowSize
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameHeader),
"::",
stringify!(windowSize)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameHeader>())).blockSizeMax
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameHeader),
"::",
stringify!(blockSizeMax)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameHeader>())).frameType as *const _
as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameHeader),
"::",
stringify!(frameType)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameHeader>())).headerSize
as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameHeader),
"::",
stringify!(headerSize)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameHeader>())).dictID as *const _
as usize
},
28usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameHeader),
"::",
stringify!(dictID)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ZSTD_frameHeader>())).checksumFlag
as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(ZSTD_frameHeader),
"::",
stringify!(checksumFlag)
)
);
}
extern "C" {
pub fn ZSTD_getFrameHeader(
zfhPtr: *mut ZSTD_frameHeader,
src: *const ::libc::c_void,
srcSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_decodingBufferSize_min(
windowSize: ::libc::c_ulonglong,
frameContentSize: ::libc::c_ulonglong,
) -> usize;
}
extern "C" {
pub fn ZSTD_decompressBegin(dctx: *mut ZSTD_DCtx) -> usize;
}
extern "C" {
pub fn ZSTD_decompressBegin_usingDict(
dctx: *mut ZSTD_DCtx,
dict: *const ::libc::c_void,
dictSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_decompressBegin_usingDDict(
dctx: *mut ZSTD_DCtx,
ddict: *const ZSTD_DDict,
) -> usize;
}
extern "C" {
pub fn ZSTD_nextSrcSizeToDecompress(dctx: *mut ZSTD_DCtx) -> usize;
}
extern "C" {
pub fn ZSTD_decompressContinue(
dctx: *mut ZSTD_DCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
src: *const ::libc::c_void,
srcSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_copyDCtx(dctx: *mut ZSTD_DCtx, preparedDCtx: *const ZSTD_DCtx);
}
pub const ZSTD_nextInputType_e_ZSTDnit_frameHeader: ZSTD_nextInputType_e = 0;
pub const ZSTD_nextInputType_e_ZSTDnit_blockHeader: ZSTD_nextInputType_e = 1;
pub const ZSTD_nextInputType_e_ZSTDnit_block: ZSTD_nextInputType_e = 2;
pub const ZSTD_nextInputType_e_ZSTDnit_lastBlock: ZSTD_nextInputType_e = 3;
pub const ZSTD_nextInputType_e_ZSTDnit_checksum: ZSTD_nextInputType_e = 4;
pub const ZSTD_nextInputType_e_ZSTDnit_skippableFrame: ZSTD_nextInputType_e =
5;
pub type ZSTD_nextInputType_e = u32;
extern "C" {
pub fn ZSTD_nextInputType(dctx: *mut ZSTD_DCtx) -> ZSTD_nextInputType_e;
}
pub const ZSTD_format_e_ZSTD_f_zstd1: ZSTD_format_e = 0;
pub const ZSTD_format_e_ZSTD_f_zstd1_magicless: ZSTD_format_e = 1;
pub type ZSTD_format_e = u32;
pub const ZSTD_cParameter_ZSTD_p_format: ZSTD_cParameter = 10;
pub const ZSTD_cParameter_ZSTD_p_compressionLevel: ZSTD_cParameter = 100;
pub const ZSTD_cParameter_ZSTD_p_windowLog: ZSTD_cParameter = 101;
pub const ZSTD_cParameter_ZSTD_p_hashLog: ZSTD_cParameter = 102;
pub const ZSTD_cParameter_ZSTD_p_chainLog: ZSTD_cParameter = 103;
pub const ZSTD_cParameter_ZSTD_p_searchLog: ZSTD_cParameter = 104;
pub const ZSTD_cParameter_ZSTD_p_minMatch: ZSTD_cParameter = 105;
pub const ZSTD_cParameter_ZSTD_p_targetLength: ZSTD_cParameter = 106;
pub const ZSTD_cParameter_ZSTD_p_compressionStrategy: ZSTD_cParameter = 107;
pub const ZSTD_cParameter_ZSTD_p_enableLongDistanceMatching: ZSTD_cParameter =
160;
pub const ZSTD_cParameter_ZSTD_p_ldmHashLog: ZSTD_cParameter = 161;
pub const ZSTD_cParameter_ZSTD_p_ldmMinMatch: ZSTD_cParameter = 162;
pub const ZSTD_cParameter_ZSTD_p_ldmBucketSizeLog: ZSTD_cParameter = 163;
pub const ZSTD_cParameter_ZSTD_p_ldmHashEveryLog: ZSTD_cParameter = 164;
pub const ZSTD_cParameter_ZSTD_p_contentSizeFlag: ZSTD_cParameter = 200;
pub const ZSTD_cParameter_ZSTD_p_checksumFlag: ZSTD_cParameter = 201;
pub const ZSTD_cParameter_ZSTD_p_dictIDFlag: ZSTD_cParameter = 202;
pub const ZSTD_cParameter_ZSTD_p_nbWorkers: ZSTD_cParameter = 400;
pub const ZSTD_cParameter_ZSTD_p_jobSize: ZSTD_cParameter = 401;
pub const ZSTD_cParameter_ZSTD_p_overlapSizeLog: ZSTD_cParameter = 402;
pub const ZSTD_cParameter_ZSTD_p_compressLiterals: ZSTD_cParameter = 1000;
pub const ZSTD_cParameter_ZSTD_p_forceMaxWindow: ZSTD_cParameter = 1100;
pub type ZSTD_cParameter = u32;
extern "C" {
pub fn ZSTD_CCtx_setParameter(
cctx: *mut ZSTD_CCtx,
param: ZSTD_cParameter,
value: ::libc::c_uint,
) -> usize;
}
extern "C" {
pub fn ZSTD_CCtx_setPledgedSrcSize(
cctx: *mut ZSTD_CCtx,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}
extern "C" {
pub fn ZSTD_CCtx_loadDictionary(
cctx: *mut ZSTD_CCtx,
dict: *const ::libc::c_void,
dictSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_CCtx_loadDictionary_byReference(
cctx: *mut ZSTD_CCtx,
dict: *const ::libc::c_void,
dictSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_CCtx_loadDictionary_advanced(
cctx: *mut ZSTD_CCtx,
dict: *const ::libc::c_void,
dictSize: usize,
dictLoadMethod: ZSTD_dictLoadMethod_e,
dictContentType: ZSTD_dictContentType_e,
) -> usize;
}
extern "C" {
pub fn ZSTD_CCtx_refCDict(
cctx: *mut ZSTD_CCtx,
cdict: *const ZSTD_CDict,
) -> usize;
}
extern "C" {
pub fn ZSTD_CCtx_refPrefix(
cctx: *mut ZSTD_CCtx,
prefix: *const ::libc::c_void,
prefixSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_CCtx_refPrefix_advanced(
cctx: *mut ZSTD_CCtx,
prefix: *const ::libc::c_void,
prefixSize: usize,
dictContentType: ZSTD_dictContentType_e,
) -> usize;
}
extern "C" {
pub fn ZSTD_CCtx_reset(cctx: *mut ZSTD_CCtx);
}
pub const ZSTD_EndDirective_ZSTD_e_continue: ZSTD_EndDirective = 0;
pub const ZSTD_EndDirective_ZSTD_e_flush: ZSTD_EndDirective = 1;
pub const ZSTD_EndDirective_ZSTD_e_end: ZSTD_EndDirective = 2;
pub type ZSTD_EndDirective = u32;
extern "C" {
pub fn ZSTD_compress_generic(
cctx: *mut ZSTD_CCtx,
output: *mut ZSTD_outBuffer,
input: *mut ZSTD_inBuffer,
endOp: ZSTD_EndDirective,
) -> usize;
}
extern "C" {
pub fn ZSTD_compress_generic_simpleArgs(
cctx: *mut ZSTD_CCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
dstPos: *mut usize,
src: *const ::libc::c_void,
srcSize: usize,
srcPos: *mut usize,
endOp: ZSTD_EndDirective,
) -> usize;
}
extern "C" {
pub fn ZSTD_createCCtxParams() -> *mut ZSTD_CCtx_params;
}
extern "C" {
pub fn ZSTD_freeCCtxParams(params: *mut ZSTD_CCtx_params) -> usize;
}
extern "C" {
pub fn ZSTD_CCtxParams_reset(params: *mut ZSTD_CCtx_params) -> usize;
}
extern "C" {
pub fn ZSTD_CCtxParams_init(
cctxParams: *mut ZSTD_CCtx_params,
compressionLevel: ::libc::c_int,
) -> usize;
}
extern "C" {
pub fn ZSTD_CCtxParams_init_advanced(
cctxParams: *mut ZSTD_CCtx_params,
params: ZSTD_parameters,
) -> usize;
}
extern "C" {
pub fn ZSTD_CCtxParam_setParameter(
params: *mut ZSTD_CCtx_params,
param: ZSTD_cParameter,
value: ::libc::c_uint,
) -> usize;
}
extern "C" {
pub fn ZSTD_CCtx_setParametersUsingCCtxParams(
cctx: *mut ZSTD_CCtx,
params: *const ZSTD_CCtx_params,
) -> usize;
}
extern "C" {
pub fn ZSTD_DCtx_loadDictionary(
dctx: *mut ZSTD_DCtx,
dict: *const ::libc::c_void,
dictSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_DCtx_loadDictionary_byReference(
dctx: *mut ZSTD_DCtx,
dict: *const ::libc::c_void,
dictSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_DCtx_loadDictionary_advanced(
dctx: *mut ZSTD_DCtx,
dict: *const ::libc::c_void,
dictSize: usize,
dictLoadMethod: ZSTD_dictLoadMethod_e,
dictContentType: ZSTD_dictContentType_e,
) -> usize;
}
extern "C" {
pub fn ZSTD_DCtx_refDDict(
dctx: *mut ZSTD_DCtx,
ddict: *const ZSTD_DDict,
) -> usize;
}
extern "C" {
pub fn ZSTD_DCtx_refPrefix(
dctx: *mut ZSTD_DCtx,
prefix: *const ::libc::c_void,
prefixSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_DCtx_refPrefix_advanced(
dctx: *mut ZSTD_DCtx,
prefix: *const ::libc::c_void,
prefixSize: usize,
dictContentType: ZSTD_dictContentType_e,
) -> usize;
}
extern "C" {
pub fn ZSTD_DCtx_setMaxWindowSize(
dctx: *mut ZSTD_DCtx,
maxWindowSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_DCtx_setFormat(
dctx: *mut ZSTD_DCtx,
format: ZSTD_format_e,
) -> usize;
}
extern "C" {
pub fn ZSTD_decompress_generic(
dctx: *mut ZSTD_DCtx,
output: *mut ZSTD_outBuffer,
input: *mut ZSTD_inBuffer,
) -> usize;
}
extern "C" {
pub fn ZSTD_decompress_generic_simpleArgs(
dctx: *mut ZSTD_DCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
dstPos: *mut usize,
src: *const ::libc::c_void,
srcSize: usize,
srcPos: *mut usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_DCtx_reset(dctx: *mut ZSTD_DCtx);
}
extern "C" {
pub fn ZSTD_getBlockSize(cctx: *const ZSTD_CCtx) -> usize;
}
extern "C" {
pub fn ZSTD_compressBlock(
cctx: *mut ZSTD_CCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
src: *const ::libc::c_void,
srcSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_decompressBlock(
dctx: *mut ZSTD_DCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
src: *const ::libc::c_void,
srcSize: usize,
) -> usize;
}
extern "C" {
pub fn ZSTD_insertBlock(
dctx: *mut ZSTD_DCtx,
blockStart: *const ::libc::c_void,
blockSize: usize,
) -> usize;
}
extern "C" {
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;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ZSTDMT_CCtx_s {
_unused: [u8; 0],
}
pub type ZSTDMT_CCtx = ZSTDMT_CCtx_s;
extern "C" {
pub fn ZSTDMT_createCCtx(nbWorkers: ::libc::c_uint) -> *mut ZSTDMT_CCtx;
}
extern "C" {
pub fn ZSTDMT_createCCtx_advanced(
nbWorkers: ::libc::c_uint,
cMem: ZSTD_customMem,
) -> *mut ZSTDMT_CCtx;
}
extern "C" {
pub fn ZSTDMT_freeCCtx(mtctx: *mut ZSTDMT_CCtx) -> usize;
}
extern "C" {
pub fn ZSTDMT_sizeof_CCtx(mtctx: *mut ZSTDMT_CCtx) -> usize;
}
extern "C" {
pub fn ZSTDMT_compressCCtx(
mtctx: *mut ZSTDMT_CCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
src: *const ::libc::c_void,
srcSize: usize,
compressionLevel: ::libc::c_int,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_initCStream(
mtctx: *mut ZSTDMT_CCtx,
compressionLevel: ::libc::c_int,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_resetCStream(
mtctx: *mut ZSTDMT_CCtx,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_compressStream(
mtctx: *mut ZSTDMT_CCtx,
output: *mut ZSTD_outBuffer,
input: *mut ZSTD_inBuffer,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_flushStream(
mtctx: *mut ZSTDMT_CCtx,
output: *mut ZSTD_outBuffer,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_endStream(
mtctx: *mut ZSTDMT_CCtx,
output: *mut ZSTD_outBuffer,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_compress_advanced(
mtctx: *mut ZSTDMT_CCtx,
dst: *mut ::libc::c_void,
dstCapacity: usize,
src: *const ::libc::c_void,
srcSize: usize,
cdict: *const ZSTD_CDict,
params: ZSTD_parameters,
overlapLog: ::libc::c_uint,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_initCStream_advanced(
mtctx: *mut ZSTDMT_CCtx,
dict: *const ::libc::c_void,
dictSize: usize,
params: ZSTD_parameters,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_initCStream_usingCDict(
mtctx: *mut ZSTDMT_CCtx,
cdict: *const ZSTD_CDict,
fparams: ZSTD_frameParameters,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}
pub const ZSTDMT_parameter_ZSTDMT_p_jobSize: ZSTDMT_parameter = 0;
pub const ZSTDMT_parameter_ZSTDMT_p_overlapSectionLog: ZSTDMT_parameter = 1;
pub type ZSTDMT_parameter = u32;
extern "C" {
pub fn ZSTDMT_setMTCtxParameter(
mtctx: *mut ZSTDMT_CCtx,
parameter: ZSTDMT_parameter,
value: ::libc::c_uint,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_compressStream_generic(
mtctx: *mut ZSTDMT_CCtx,
output: *mut ZSTD_outBuffer,
input: *mut ZSTD_inBuffer,
endOp: ZSTD_EndDirective,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_CCtxParam_setMTCtxParameter(
params: *mut ZSTD_CCtx_params,
parameter: ZSTDMT_parameter,
value: ::libc::c_uint,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_CCtxParam_setNbWorkers(
params: *mut ZSTD_CCtx_params,
nbWorkers: ::libc::c_uint,
) -> usize;
}
extern "C" {
pub fn ZSTDMT_updateCParams_whileCompressing(
mtctx: *mut ZSTDMT_CCtx,
cctxParams: *const ZSTD_CCtx_params,
);
}
extern "C" {
pub fn ZSTDMT_getNbWorkers(mtctx: *const ZSTDMT_CCtx) -> ::libc::c_uint;
}
extern "C" {
pub fn ZSTDMT_getFrameProgression(
mtctx: *mut ZSTDMT_CCtx,
) -> ZSTD_frameProgression;
}
extern "C" {
pub fn ZSTDMT_initCStream_internal(
zcs: *mut ZSTDMT_CCtx,
dict: *const ::libc::c_void,
dictSize: usize,
dictContentType: ZSTD_dictContentType_e,
cdict: *const ZSTD_CDict,
params: ZSTD_CCtx_params,
pledgedSrcSize: ::libc::c_ulonglong,
) -> usize;
}