pub struct BrotliDecoderOptions { /* private fields */ }
Expand description
Decompression options to be used for a BrotliDecoder
.
§Examples
Building an decoder that supports large window sizes:
use brotlic::BrotliDecoderOptions;
let encoder = BrotliDecoderOptions::new().large_window_size(true).build();
Implementations§
Source§impl BrotliDecoderOptions
impl BrotliDecoderOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new blank set decoder options.
initially no modifications are applied to the decoder and everything is set to its default values.
Sourcepub fn disable_ring_buffer_reallocation(
&mut self,
disable_ring_buffer_reallocation: bool,
) -> &mut Self
pub fn disable_ring_buffer_reallocation( &mut self, disable_ring_buffer_reallocation: bool, ) -> &mut Self
Disable “canny” ring buffer allocation strategy.
Ring buffer is allocated according to window size, despite the real size of the content.
Sourcepub fn large_window_size(&mut self, large_window_size: bool) -> &mut Self
pub fn large_window_size(&mut self, large_window_size: bool) -> &mut Self
Flag that determines if this decoder supports non standard large window
sizes. By default, this is turned off and window sizes are limited by
RFC7932 (Brotli proper). To support large window sizes outside of the
specification, this flag must be enabled. For more information see
LargeWindowSize
.
Sourcepub fn build(&self) -> Result<BrotliDecoder, SetParameterError>
pub fn build(&self) -> Result<BrotliDecoder, SetParameterError>
Creates a brotli decoder using the specified settings.
§Errors
If any of the preconditions of the parameters are violated, an error is returned.
Trait Implementations§
Source§impl Clone for BrotliDecoderOptions
impl Clone for BrotliDecoderOptions
Source§fn clone(&self) -> BrotliDecoderOptions
fn clone(&self) -> BrotliDecoderOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more