Struct libflate::lz77::DefaultLz77EncoderBuilder [−][src]
pub struct DefaultLz77EncoderBuilder { /* fields omitted */ }
Expand description
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
Create a builder with the default parameters for the encoder.
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.
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.
Build the encoder with the builder state’s parameters.
Trait Implementations
Returns the “default value” for a type. Read more