Struct yazi::Encoder[][src]

pub struct Encoder(_);
Expand description

Stateful context for compression.

See the crate level compression section for detailed usage.

Implementations

Creates a new deflate encoder. Note that creating an encoder with this method allocates a large (200-300k) chunk of data on the stack and is likely to cause an overflow if not carefully managed. See the boxed() constructor for a safer method that allocates on the heap.

Creates a new deflate encoder on the heap.

Sets the format of the output bitstream for the next usage of the encoder.

Sets the compression level for the next usage of the encoder.

Sets the compression strategy for the next usage of the encoder.

Creates an encoder stream that will write into the specified writer.

Creates an encoder stream that will write into the specified vector. The resulting stream will not clear the vector but will instead append the compressed data.

Creates an encoder stream that will write into the specified buffer. The stream will generate an overflow error if the buffer is not large enough to contain the compressed data.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.