csbindgen/csbindgen-tests/src/zstd_ffi.rs

825 lines
13 KiB
Rust
Raw Normal View History

2023-03-06 00:44:48 +00:00
/* automatically generated by csbindgen */
#[allow(unused)]
use ::std::os::raw::*;
use super::zstd::*;
2023-03-06 00:44:48 +00:00
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_versionNumber(
2023-03-06 00:44:48 +00:00
) -> c_uint
{
ZSTD_versionNumber(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_versionString(
2023-03-06 00:44:48 +00:00
) -> *const c_char
{
ZSTD_versionString(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_compress(
2023-03-06 00:44:48 +00:00
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
srcSize: usize,
compressionLevel: c_int
) -> usize
{
ZSTD_compress(
dst,
dstCapacity,
src,
srcSize,
compressionLevel
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_decompress(
2023-03-06 00:44:48 +00:00
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
compressedSize: usize
) -> usize
{
ZSTD_decompress(
dst,
dstCapacity,
src,
compressedSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_getFrameContentSize(
2023-03-06 00:44:48 +00:00
src: *const c_void,
srcSize: usize
) -> c_ulonglong
{
ZSTD_getFrameContentSize(
src,
srcSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_getDecompressedSize(
2023-03-06 00:44:48 +00:00
src: *const c_void,
srcSize: usize
) -> c_ulonglong
{
ZSTD_getDecompressedSize(
src,
srcSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_findFrameCompressedSize(
2023-03-06 00:44:48 +00:00
src: *const c_void,
srcSize: usize
) -> usize
{
ZSTD_findFrameCompressedSize(
src,
srcSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_compressBound(
2023-03-06 00:44:48 +00:00
srcSize: usize
) -> usize
{
ZSTD_compressBound(
srcSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_isError(
2023-03-06 00:44:48 +00:00
code: usize
) -> c_uint
{
ZSTD_isError(
code
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_getErrorName(
2023-03-06 00:44:48 +00:00
code: usize
) -> *const c_char
{
ZSTD_getErrorName(
code
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_minCLevel(
2023-03-06 00:44:48 +00:00
) -> c_int
{
ZSTD_minCLevel(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_maxCLevel(
2023-03-06 00:44:48 +00:00
) -> c_int
{
ZSTD_maxCLevel(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_defaultCLevel(
2023-03-06 00:44:48 +00:00
) -> c_int
{
ZSTD_defaultCLevel(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_createCCtx(
2023-03-06 00:44:48 +00:00
) -> *mut ZSTD_CCtx
{
ZSTD_createCCtx(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_freeCCtx(
2023-03-06 00:44:48 +00:00
cctx: *mut ZSTD_CCtx
) -> usize
{
ZSTD_freeCCtx(
cctx
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_compressCCtx(
2023-03-06 00:44:48 +00:00
cctx: *mut ZSTD_CCtx,
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
srcSize: usize,
compressionLevel: c_int
) -> usize
{
ZSTD_compressCCtx(
cctx,
dst,
dstCapacity,
src,
srcSize,
compressionLevel
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_createDCtx(
2023-03-06 00:44:48 +00:00
) -> *mut ZSTD_DCtx
{
ZSTD_createDCtx(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_freeDCtx(
2023-03-06 00:44:48 +00:00
dctx: *mut ZSTD_DCtx
) -> usize
{
ZSTD_freeDCtx(
dctx
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_decompressDCtx(
2023-03-06 00:44:48 +00:00
dctx: *mut ZSTD_DCtx,
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
srcSize: usize
) -> usize
{
ZSTD_decompressDCtx(
dctx,
dst,
dstCapacity,
src,
srcSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_cParam_getBounds(
2023-03-06 00:44:48 +00:00
cParam: ZSTD_cParameter
) -> ZSTD_bounds
{
ZSTD_cParam_getBounds(
cParam
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_setParameter(
2023-03-06 00:44:48 +00:00
cctx: *mut ZSTD_CCtx,
param: ZSTD_cParameter,
value: c_int
) -> usize
{
ZSTD_CCtx_setParameter(
cctx,
param,
value
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_setPledgedSrcSize(
2023-03-06 00:44:48 +00:00
cctx: *mut ZSTD_CCtx,
pledgedSrcSize: c_ulonglong
) -> usize
{
ZSTD_CCtx_setPledgedSrcSize(
cctx,
pledgedSrcSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_reset(
2023-03-06 00:44:48 +00:00
cctx: *mut ZSTD_CCtx,
reset: ZSTD_ResetDirective
) -> usize
{
ZSTD_CCtx_reset(
cctx,
reset
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_compress2(
2023-03-06 00:44:48 +00:00
cctx: *mut ZSTD_CCtx,
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
srcSize: usize
) -> usize
{
ZSTD_compress2(
cctx,
dst,
dstCapacity,
src,
srcSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_dParam_getBounds(
2023-03-06 00:44:48 +00:00
dParam: ZSTD_dParameter
) -> ZSTD_bounds
{
ZSTD_dParam_getBounds(
dParam
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_setParameter(
2023-03-06 00:44:48 +00:00
dctx: *mut ZSTD_DCtx,
param: ZSTD_dParameter,
value: c_int
) -> usize
{
ZSTD_DCtx_setParameter(
dctx,
param,
value
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_reset(
2023-03-06 00:44:48 +00:00
dctx: *mut ZSTD_DCtx,
reset: ZSTD_ResetDirective
) -> usize
{
ZSTD_DCtx_reset(
dctx,
reset
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_createCStream(
2023-03-06 00:44:48 +00:00
) -> *mut ZSTD_CStream
{
ZSTD_createCStream(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_freeCStream(
2023-03-06 00:44:48 +00:00
zcs: *mut ZSTD_CStream
) -> usize
{
ZSTD_freeCStream(
zcs
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_compressStream2(
2023-03-06 00:44:48 +00:00
cctx: *mut ZSTD_CCtx,
output: *mut ZSTD_outBuffer,
input: *mut ZSTD_inBuffer,
endOp: ZSTD_EndDirective
) -> usize
{
ZSTD_compressStream2(
cctx,
output,
input,
endOp
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_CStreamInSize(
2023-03-06 00:44:48 +00:00
) -> usize
{
ZSTD_CStreamInSize(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_CStreamOutSize(
2023-03-06 00:44:48 +00:00
) -> usize
{
ZSTD_CStreamOutSize(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_initCStream(
2023-03-06 00:44:48 +00:00
zcs: *mut ZSTD_CStream,
compressionLevel: c_int
) -> usize
{
ZSTD_initCStream(
zcs,
compressionLevel
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_compressStream(
2023-03-06 00:44:48 +00:00
zcs: *mut ZSTD_CStream,
output: *mut ZSTD_outBuffer,
input: *mut ZSTD_inBuffer
) -> usize
{
ZSTD_compressStream(
zcs,
output,
input
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_flushStream(
2023-03-06 00:44:48 +00:00
zcs: *mut ZSTD_CStream,
output: *mut ZSTD_outBuffer
) -> usize
{
ZSTD_flushStream(
zcs,
output
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_endStream(
2023-03-06 00:44:48 +00:00
zcs: *mut ZSTD_CStream,
output: *mut ZSTD_outBuffer
) -> usize
{
ZSTD_endStream(
zcs,
output
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_createDStream(
2023-03-06 00:44:48 +00:00
) -> *mut ZSTD_DStream
{
ZSTD_createDStream(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_freeDStream(
2023-03-06 00:44:48 +00:00
zds: *mut ZSTD_DStream
) -> usize
{
ZSTD_freeDStream(
zds
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_initDStream(
2023-03-06 00:44:48 +00:00
zds: *mut ZSTD_DStream
) -> usize
{
ZSTD_initDStream(
zds
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_decompressStream(
2023-03-06 00:44:48 +00:00
zds: *mut ZSTD_DStream,
output: *mut ZSTD_outBuffer,
input: *mut ZSTD_inBuffer
) -> usize
{
ZSTD_decompressStream(
zds,
output,
input
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_DStreamInSize(
2023-03-06 00:44:48 +00:00
) -> usize
{
ZSTD_DStreamInSize(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_DStreamOutSize(
2023-03-06 00:44:48 +00:00
) -> usize
{
ZSTD_DStreamOutSize(
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_compress_usingDict(
2023-03-06 00:44:48 +00:00
ctx: *mut ZSTD_CCtx,
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
srcSize: usize,
dict: *const c_void,
dictSize: usize,
compressionLevel: c_int
) -> usize
{
ZSTD_compress_usingDict(
ctx,
dst,
dstCapacity,
src,
srcSize,
dict,
dictSize,
compressionLevel
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_decompress_usingDict(
2023-03-06 00:44:48 +00:00
dctx: *mut ZSTD_DCtx,
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
srcSize: usize,
dict: *const c_void,
dictSize: usize
) -> usize
{
ZSTD_decompress_usingDict(
dctx,
dst,
dstCapacity,
src,
srcSize,
dict,
dictSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_createCDict(
2023-03-06 00:44:48 +00:00
dictBuffer: *const c_void,
dictSize: usize,
compressionLevel: c_int
) -> *mut ZSTD_CDict
{
ZSTD_createCDict(
dictBuffer,
dictSize,
compressionLevel
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_freeCDict(
2023-03-06 00:44:48 +00:00
CDict: *mut ZSTD_CDict
) -> usize
{
ZSTD_freeCDict(
CDict
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_compress_usingCDict(
2023-03-06 00:44:48 +00:00
cctx: *mut ZSTD_CCtx,
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
srcSize: usize,
cdict: *const ZSTD_CDict
) -> usize
{
ZSTD_compress_usingCDict(
cctx,
dst,
dstCapacity,
src,
srcSize,
cdict
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_createDDict(
2023-03-06 00:44:48 +00:00
dictBuffer: *const c_void,
dictSize: usize
) -> *mut ZSTD_DDict
{
ZSTD_createDDict(
dictBuffer,
dictSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_freeDDict(
2023-03-06 00:44:48 +00:00
ddict: *mut ZSTD_DDict
) -> usize
{
ZSTD_freeDDict(
ddict
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_decompress_usingDDict(
2023-03-06 00:44:48 +00:00
dctx: *mut ZSTD_DCtx,
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
srcSize: usize,
ddict: *const ZSTD_DDict
) -> usize
{
ZSTD_decompress_usingDDict(
dctx,
dst,
dstCapacity,
src,
srcSize,
ddict
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromDict(
2023-03-06 00:44:48 +00:00
dict: *const c_void,
dictSize: usize
) -> c_uint
{
ZSTD_getDictID_fromDict(
dict,
dictSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromCDict(
2023-03-06 00:44:48 +00:00
cdict: *const ZSTD_CDict
) -> c_uint
{
ZSTD_getDictID_fromCDict(
cdict
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromDDict(
2023-03-06 00:44:48 +00:00
ddict: *const ZSTD_DDict
) -> c_uint
{
ZSTD_getDictID_fromDDict(
ddict
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromFrame(
2023-03-06 00:44:48 +00:00
src: *const c_void,
srcSize: usize
) -> c_uint
{
ZSTD_getDictID_fromFrame(
src,
srcSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_loadDictionary(
2023-03-06 00:44:48 +00:00
cctx: *mut ZSTD_CCtx,
dict: *const c_void,
dictSize: usize
) -> usize
{
ZSTD_CCtx_loadDictionary(
cctx,
dict,
dictSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_refCDict(
2023-03-06 00:44:48 +00:00
cctx: *mut ZSTD_CCtx,
cdict: *const ZSTD_CDict
) -> usize
{
ZSTD_CCtx_refCDict(
cctx,
cdict
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_refPrefix(
2023-03-06 00:44:48 +00:00
cctx: *mut ZSTD_CCtx,
prefix: *const c_void,
prefixSize: usize
) -> usize
{
ZSTD_CCtx_refPrefix(
cctx,
prefix,
prefixSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_loadDictionary(
2023-03-06 00:44:48 +00:00
dctx: *mut ZSTD_DCtx,
dict: *const c_void,
dictSize: usize
) -> usize
{
ZSTD_DCtx_loadDictionary(
dctx,
dict,
dictSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_refDDict(
2023-03-06 00:44:48 +00:00
dctx: *mut ZSTD_DCtx,
ddict: *const ZSTD_DDict
) -> usize
{
ZSTD_DCtx_refDDict(
dctx,
ddict
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_refPrefix(
2023-03-06 00:44:48 +00:00
dctx: *mut ZSTD_DCtx,
prefix: *const c_void,
prefixSize: usize
) -> usize
{
ZSTD_DCtx_refPrefix(
dctx,
prefix,
prefixSize
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CCtx(
2023-03-06 00:44:48 +00:00
cctx: *const ZSTD_CCtx
) -> usize
{
ZSTD_sizeof_CCtx(
cctx
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DCtx(
2023-03-06 00:44:48 +00:00
dctx: *const ZSTD_DCtx
) -> usize
{
ZSTD_sizeof_DCtx(
dctx
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CStream(
2023-03-06 00:44:48 +00:00
zcs: *const ZSTD_CStream
) -> usize
{
ZSTD_sizeof_CStream(
zcs
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DStream(
2023-03-06 00:44:48 +00:00
zds: *const ZSTD_DStream
) -> usize
{
ZSTD_sizeof_DStream(
zds
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CDict(
2023-03-06 00:44:48 +00:00
cdict: *const ZSTD_CDict
) -> usize
{
ZSTD_sizeof_CDict(
cdict
)
}
#[no_mangle]
2023-03-12 22:34:15 +00:00
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DDict(
2023-03-06 00:44:48 +00:00
ddict: *const ZSTD_DDict
) -> usize
{
ZSTD_sizeof_DDict(
ddict
)
}