Struct Packbits

pub struct Packbits;

Compressor that uses the Packbits1 algorithm to compress bytes.

  1. PackBits is often ineffective on continuous tone images, including many grayscale images. In such cases, it is better to leave the image uncompressed.

Trait Implementations

impl Clone for Packbits

fn clone(&self) -> Packbits

impl Compression for Packbits

const COMPRESSION_METHOD: CompressionMethod = CompressionMethod::PackBits;
fn get_algorithm(&self) -> Compressor

impl CompressionAlgorithm for Packbits

fn write_to<W: Write>(&mut self, writer: &mut W, bytes: &[u8]) -> Result<u64, Error>

impl Copy for Packbits

impl Debug for Packbits

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for Packbits

fn default() -> Packbits

impl Eq for Packbits

impl PartialEq for Packbits

fn eq(&self, other: &Packbits) -> bool

impl StructuralPartialEq for Packbits

Auto Trait Implementations

impl Freeze for Packbits

impl RefUnwindSafe for Packbits

impl Send for Packbits

impl Sync for Packbits

impl Unpin for Packbits

impl UnsafeUnpin for Packbits

impl UnwindSafe for Packbits

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for Packbits where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for Packbits where ST: ?Sized, DT: ?Sized,

impl<T> Any for Packbits where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Packbits where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Packbits where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Packbits where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Packbits

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Read<Exclusive, BecauseExclusive> for Packbits where T: ?Sized,

impl<T> ToOwned for Packbits where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Packbits where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Packbits where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Packbits where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>