[−][src]Struct lodepng::ffi::CompressSettings
Settings for zlib compression. Tweaking these settings tweaks the balance between speed and compression ratio.
Fields
btype: c_uint
the block type for LZ (0, 1, 2 or 3, see zlib standard). Should be 2 for proper compression.
use_lz77: c_uint
whether or not to use LZ77. Should be 1 for proper compression.
windowsize: c_uint
must be a power of two <= 32768. higher compresses more but is slower. Typical value: 2048.
minmatch: c_uint
mininum lz77 length. 3 is normally best, 6 can be better for some PNGs. Default: 0
nicematch: c_uint
stop searching if >= this length found. Set to 258 for best compression. Default: 128
lazymatching: c_uint
use lazy matching: better compression but a bit slower. Default: true
custom_zlib: custom_compress_callback
use custom zlib encoder instead of built in one (default: None)
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
custom_context: *const c_void
optional custom settings for custom functions
Methods
impl CompressSettings
[src]
pub fn new() -> CompressSettings
[src]
Default compression settings
Trait Implementations
impl Sync for CompressSettings
[src]
impl Default for CompressSettings
[src]
impl Clone for CompressSettings
[src]
fn clone(&self) -> CompressSettings
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for CompressSettings
[src]
Auto Trait Implementations
impl !Send for CompressSettings
impl Unpin for CompressSettings
impl UnwindSafe for CompressSettings
impl RefUnwindSafe for CompressSettings
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,