Enum png_pong::encode::FilterStrategy
source · pub enum FilterStrategy {
Zero,
MinSum,
Entropy,
BruteForce,
}
Expand description
Filter strategy for compression.
Variants§
Zero
Every filter at zero
MinSum
Use filter that gives minumum sum, as described in the official PNG filter heuristic. This is a good default (balance between time to compress and size).
Entropy
Use the filter type that gives smallest Shannon entropy for this scanline. Depending on the image, this is better or worse than minsum.
BruteForce
Brute-force-search PNG filters by compressing each filter for each scanline. Very slow, and only rarely gives better compression than MINSUM.
Trait Implementations§
source§impl Clone for FilterStrategy
impl Clone for FilterStrategy
source§fn clone(&self) -> FilterStrategy
fn clone(&self) -> FilterStrategy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FilterStrategy
impl Debug for FilterStrategy
source§impl PartialEq for FilterStrategy
impl PartialEq for FilterStrategy
source§fn eq(&self, other: &FilterStrategy) -> bool
fn eq(&self, other: &FilterStrategy) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for FilterStrategy
impl Eq for FilterStrategy
impl StructuralPartialEq for FilterStrategy
Auto Trait Implementations§
impl Freeze for FilterStrategy
impl RefUnwindSafe for FilterStrategy
impl Send for FilterStrategy
impl Sync for FilterStrategy
impl Unpin for FilterStrategy
impl UnwindSafe for FilterStrategy
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more