/* automatically generated by rust-bindgen 0.69.4 */ #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libdeflate_compressor { _unused: [u8; 0], } extern "C" { pub fn libdeflate_alloc_compressor( compression_level: ::std::os::raw::c_int, ) -> *mut libdeflate_compressor; } extern "C" { pub fn libdeflate_deflate_compress( compressor: *mut libdeflate_compressor, in_: *const ::std::os::raw::c_void, in_nbytes: usize, out: *mut ::std::os::raw::c_void, out_nbytes_avail: usize, ) -> usize; } extern "C" { pub fn libdeflate_deflate_compress_bound( compressor: *mut libdeflate_compressor, in_nbytes: usize, ) -> usize; } extern "C" { pub fn libdeflate_zlib_compress( compressor: *mut libdeflate_compressor, in_: *const ::std::os::raw::c_void, in_nbytes: usize, out: *mut ::std::os::raw::c_void, out_nbytes_avail: usize, ) -> usize; } extern "C" { pub fn libdeflate_zlib_compress_bound( compressor: *mut libdeflate_compressor, in_nbytes: usize, ) -> usize; } extern "C" { pub fn libdeflate_gzip_compress( compressor: *mut libdeflate_compressor, in_: *const ::std::os::raw::c_void, in_nbytes: usize, out: *mut ::std::os::raw::c_void, out_nbytes_avail: usize, ) -> usize; } extern "C" { pub fn libdeflate_gzip_compress_bound( compressor: *mut libdeflate_compressor, in_nbytes: usize, ) -> usize; } extern "C" { pub fn libdeflate_free_compressor(compressor: *mut libdeflate_compressor); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libdeflate_decompressor { _unused: [u8; 0], } extern "C" { pub fn libdeflate_alloc_decompressor() -> *mut libdeflate_decompressor; } pub const libdeflate_result_LIBDEFLATE_SUCCESS: libdeflate_result = 0; pub const libdeflate_result_LIBDEFLATE_BAD_DATA: libdeflate_result = 1; pub const libdeflate_result_LIBDEFLATE_SHORT_OUTPUT: libdeflate_result = 2; pub const libdeflate_result_LIBDEFLATE_INSUFFICIENT_SPACE: libdeflate_result = 3; pub type libdeflate_result = ::std::os::raw::c_int; extern "C" { pub fn libdeflate_deflate_decompress( decompressor: *mut libdeflate_decompressor, in_: *const ::std::os::raw::c_void, in_nbytes: usize, out: *mut ::std::os::raw::c_void, out_nbytes_avail: usize, actual_out_nbytes_ret: *mut usize, ) -> libdeflate_result; } extern "C" { pub fn libdeflate_deflate_decompress_ex( decompressor: *mut libdeflate_decompressor, in_: *const ::std::os::raw::c_void, in_nbytes: usize, out: *mut ::std::os::raw::c_void, out_nbytes_avail: usize, actual_in_nbytes_ret: *mut usize, actual_out_nbytes_ret: *mut usize, ) -> libdeflate_result; } extern "C" { pub fn libdeflate_zlib_decompress( decompressor: *mut libdeflate_decompressor, in_: *const ::std::os::raw::c_void, in_nbytes: usize, out: *mut ::std::os::raw::c_void, out_nbytes_avail: usize, actual_out_nbytes_ret: *mut usize, ) -> libdeflate_result; } extern "C" { pub fn libdeflate_zlib_decompress_ex( decompressor: *mut libdeflate_decompressor, in_: *const ::std::os::raw::c_void, in_nbytes: usize, out: *mut ::std::os::raw::c_void, out_nbytes_avail: usize, actual_in_nbytes_ret: *mut usize, actual_out_nbytes_ret: *mut usize, ) -> libdeflate_result; } extern "C" { pub fn libdeflate_gzip_decompress( decompressor: *mut libdeflate_decompressor, in_: *const ::std::os::raw::c_void, in_nbytes: usize, out: *mut ::std::os::raw::c_void, out_nbytes_avail: usize, actual_out_nbytes_ret: *mut usize, ) -> libdeflate_result; } extern "C" { pub fn libdeflate_gzip_decompress_ex( decompressor: *mut libdeflate_decompressor, in_: *const ::std::os::raw::c_void, in_nbytes: usize, out: *mut ::std::os::raw::c_void, out_nbytes_avail: usize, actual_in_nbytes_ret: *mut usize, actual_out_nbytes_ret: *mut usize, ) -> libdeflate_result; } extern "C" { pub fn libdeflate_free_decompressor(decompressor: *mut libdeflate_decompressor); } extern "C" { pub fn libdeflate_adler32(adler: u32, buffer: *const ::std::os::raw::c_void, len: usize) -> u32; } extern "C" { pub fn libdeflate_crc32(crc: u32, buffer: *const ::std::os::raw::c_void, len: usize) -> u32; } extern "C" { pub fn libdeflate_set_memory_allocator( malloc_func: ::std::option::Option< unsafe extern "C" fn(arg1: usize) -> *mut ::std::os::raw::c_void, >, free_func: ::std::option::Option, ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libdeflate_gdeflate_compressor { _unused: [u8; 0], } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libdeflate_gdeflate_out_page { pub data: *mut ::std::os::raw::c_void, pub nbytes: usize, } extern "C" { pub fn libdeflate_alloc_gdeflate_compressor( compression_level: ::std::os::raw::c_int, ) -> *mut libdeflate_gdeflate_compressor; } extern "C" { pub fn libdeflate_gdeflate_compress( compressor: *mut libdeflate_gdeflate_compressor, in_: *const ::std::os::raw::c_void, in_nbytes: usize, out_pages: *mut libdeflate_gdeflate_out_page, out_npages: usize, ) -> usize; } extern "C" { pub fn libdeflate_gdeflate_compress_bound( comp: *mut libdeflate_gdeflate_compressor, in_nbytes: usize, out_npages: *mut usize, ) -> usize; } extern "C" { pub fn libdeflate_free_gdeflate_compressor(comp: *mut libdeflate_gdeflate_compressor); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libdeflate_gdeflate_decompressor { _unused: [u8; 0], } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libdeflate_gdeflate_in_page { pub data: *const ::std::os::raw::c_void, pub nbytes: usize, } extern "C" { pub fn libdeflate_alloc_gdeflate_decompressor() -> *mut libdeflate_gdeflate_decompressor; } extern "C" { pub fn libdeflate_gdeflate_decompress( decomp: *mut libdeflate_gdeflate_decompressor, in_pages: *mut libdeflate_gdeflate_in_page, in_npages: usize, out: *mut ::std::os::raw::c_void, out_nbytes_avail: usize, actual_out_nbytes_ret: *mut usize, ) -> libdeflate_result; } extern "C" { pub fn libdeflate_free_gdeflate_decompressor(decomp: *mut libdeflate_gdeflate_decompressor); }