Compression

Trait Compression 

Source
pub trait Compression: Sized {
    type Data;
    type CompressedData;

    // Required methods
    fn compress(&self, data: &Self::Data) -> Compressed<Self>;
    fn decompress(compressed: &Self::CompressedData) -> Self::Data;
}
Expand description

An algorithm for: 1. compressing a specific type Data into type Compressed 2. decompressing Compressed back into Data

Required Associated Types§

Required Methods§

Source

fn compress(&self, data: &Self::Data) -> Compressed<Self>

Source

fn decompress(compressed: &Self::CompressedData) -> Self::Data

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A, B, By> Compression for FastChannelsCompression<By, (Channel<A>, Channel<B>)>

Source§

impl<A, B, C, By> Compression for FastChannelsCompression<By, (Channel<A>, Channel<B>, Channel<C>)>

Source§

impl<A, B, C, D, By> Compression for FastChannelsCompression<By, (Channel<A>, Channel<B>, Channel<C>, Channel<D>)>

Source§

impl<A, B, C, D, E, By> Compression for FastChannelsCompression<By, (Channel<A>, Channel<B>, Channel<C>, Channel<D>, Channel<E>)>

Source§

impl<A, B, C, D, E, F, By> Compression for FastChannelsCompression<By, (Channel<A>, Channel<B>, Channel<C>, Channel<D>, Channel<E>, Channel<F>)>

Source§

impl<A, By> Compression for FastChannelsCompression<By, (Channel<A>,)>
where FastChannelsCompression<By, Channel<A>>: Compression<Data = Channel<A>>, By: Clone,

Source§

impl<By, T> Compression for FastChannelsCompression<By, Channel<T>>
where By: BytesCompression, Channel<T>: for<'r> AsRawBytes<'r>,

Source§

impl<N, C> Compression for FastArrayCompression<N, C>
where PointN<N>: Copy, C: Compression,

Source§

impl<T, A> Compression for BincodeCompression<T, A>