Struct lodepng::ffi::CompressSettings
source · #[repr(C)]pub struct CompressSettings {
pub windowsize: u32,
pub minmatch: u16,
pub nicematch: u16,
pub btype: u8,
pub use_lz77: bool,
pub lazymatching: bool,
pub custom_zlib: custom_compress_callback,
pub custom_deflate: custom_compress_callback,
pub custom_context: *const c_void,
}
Expand description
Settings for zlib compression. Tweaking these settings tweaks the balance between speed and compression ratio.
Fields§
§windowsize: u32
Obsolete. No-op.
minmatch: u16
Compression level 1 (fast) to 9 (best). Use set_level()
instead.
nicematch: u16
Obsolete. No-op.
btype: u8
Obsolete. No-op.
use_lz77: bool
If false, it won’t compress at all. Use set_level(0)
lazymatching: bool
Obsolete. No-op.
custom_zlib: custom_compress_callback
use custom zlib encoder instead of built in one (default: None).
You should configure the flate2
crate to use another zlib instead.
This option will cause unnecessary buffering.
custom_deflate: custom_compress_callback
use custom deflate encoder instead of built in one (default: null) if custom_zlib is used, custom_deflate is ignored since only the built in zlib function will call custom_deflate
You should configure the flate2
crate to use another zlib instead.
This option will cause unnecessary buffering.
custom_context: *const c_void
optional custom settings for custom functions
Implementations§
source§impl CompressSettings
impl CompressSettings
sourcepub fn new() -> CompressSettings
pub fn new() -> CompressSettings
Default compression settings
Trait Implementations§
source§impl Clone for CompressSettings
impl Clone for CompressSettings
source§fn clone(&self) -> CompressSettings
fn clone(&self) -> CompressSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more