[][src]Struct lodepng::ffi::CompressSettings

#[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,
}

Settings for zlib compression. Tweaking these settings tweaks the balance between speed and compression ratio.

Fields

windowsize: u32
👎 Deprecated

Obsolete. No-op.

minmatch: u16
👎 Deprecated

Compression level 1 (fast) to 9 (best). Use set_level() instead.

nicematch: u16
👎 Deprecated

Obsolete. No-op.

btype: u8
👎 Deprecated

Obsolete. No-op.

use_lz77: bool
👎 Deprecated

If false, it won't compress at all. Use set_level(0)

lazymatching: bool
👎 Deprecated

Obsolete. No-op.

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

Implementations

impl CompressSettings[src]

pub fn set_level(&mut self, level: u8)[src]

0 (none), 1 (fast) to 9 (best)

pub fn level(&self) -> u8[src]

zlib compression level

impl CompressSettings[src]

pub fn new() -> CompressSettings[src]

Default compression settings

Trait Implementations

impl Clone for CompressSettings[src]

impl Debug for CompressSettings[src]

impl Default for CompressSettings[src]

impl Sync for CompressSettings[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.