[][src]Struct mla::layers::compress::CompressionLayerWriter

pub struct CompressionLayerWriter<'a, W: 'a + Write> { /* fields omitted */ }

Compression layer is made of independent CompressedBlock, ending by an index for seekable accesses [CompressedBlock][CompressedBlock]...[CompressedBlock][Index]

Compression is made of nested independent compressed block of a fixed uncompressed size Pro:

  • no need to store the compressed size
  • compression can be streamed (storing the compressed size before the compressed block leads to either seekable stream, which is not an option here, or full-memory compression before actual write, which add limits to the memory footprint) Cons:
  • if the index is lost, a slow decompression with a block size of 1 is needed to found the CompressedBlock boundaries

Implementations

impl<'a, W: 'a + Write> CompressionLayerWriter<'a, W>[src]

pub fn new(
    inner: Box<dyn LayerWriter<'a, W> + 'a>,
    config: &CompressionConfig
) -> CompressionLayerWriter<'a, W>

Notable traits for CompressionLayerWriter<'a, W>

impl<'a, W: 'a + Write> Write for CompressionLayerWriter<'a, W>
[src]

Trait Implementations

impl<'a, W: 'a + Write> LayerWriter<'a, W> for CompressionLayerWriter<'a, W>[src]

impl<'a, W: 'a + Write> Write for CompressionLayerWriter<'a, W>[src]

Auto Trait Implementations

impl<'a, W> !RefUnwindSafe for CompressionLayerWriter<'a, W>

impl<'a, W> !Send for CompressionLayerWriter<'a, W>

impl<'a, W> !Sync for CompressionLayerWriter<'a, W>

impl<'a, W> Unpin for CompressionLayerWriter<'a, W>

impl<'a, W> !UnwindSafe for CompressionLayerWriter<'a, W>

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> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<W> WriteBytesExt for W where
    W: Write + ?Sized
[src]