Struct libflate::lz77::DefaultLz77EncoderBuilder [−][src]
Type for constructing instances of DefaultLz77Encoder
.
Examples
use libflate_lz77::{ DefaultLz77EncoderBuilder, MAX_LENGTH, MAX_WINDOW_SIZE, }; // Produce an encoder explicitly with the default window size and max copy length let _encoder = DefaultLz77EncoderBuilder::new() .window_size(MAX_WINDOW_SIZE) .max_length(MAX_LENGTH) .build();
Implementations
impl DefaultLz77EncoderBuilder
[src]
pub fn new() -> DefaultLz77EncoderBuilder
[src]
Create a builder with the default parameters for the encoder.
pub fn window_size(self, window_size: u16) -> DefaultLz77EncoderBuilder
[src]
Set the size of the sliding search window used during compression.
Larger values require more memory. The standard window size may be unsuitable for a particular Sink; for example, if the encoding used cannot express pointer distances past a certain size, you would want the window size to be no greater than the Sink’s limit.
pub fn max_length(self, max_length: u16) -> DefaultLz77EncoderBuilder
[src]
Set the maximum length of a pointer command this encoder will emit.
Some uses of LZ77 may not be able to encode pointers of the standard maximum length of 258 bytes. In this case, you may set your own maximum which can be encoded by the Sink.
pub fn build(self) -> DefaultLz77Encoder
[src]
Build the encoder with the builder state’s parameters.
Trait Implementations
impl Debug for DefaultLz77EncoderBuilder
[src]
impl Default for DefaultLz77EncoderBuilder
[src]
pub fn default() -> DefaultLz77EncoderBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for DefaultLz77EncoderBuilder
impl Send for DefaultLz77EncoderBuilder
impl Sync for DefaultLz77EncoderBuilder
impl Unpin for DefaultLz77EncoderBuilder
impl UnwindSafe for DefaultLz77EncoderBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,