pub struct Configuration {
order: BitOrder,
size: u8,
tiff: bool,
yield_on_full: bool,
}
Expand description
Describes the static parameters for creating a decoder.
Fields§
§order: BitOrder
§size: u8
§tiff: bool
§yield_on_full: bool
Implementations§
Source§impl Configuration
impl Configuration
Sourcepub fn new(order: BitOrder, size: u8) -> Self
pub fn new(order: BitOrder, size: u8) -> Self
Create a configuration to decode with the specified bit order and symbol size.
Sourcepub fn with_tiff_size_switch(order: BitOrder, size: u8) -> Self
pub fn with_tiff_size_switch(order: BitOrder, size: u8) -> Self
Create a configuration for a TIFF compatible decoder.
Sourcepub fn with_yield_on_full_buffer(self, do_yield: bool) -> Self
pub fn with_yield_on_full_buffer(self, do_yield: bool) -> Self
Immediately yield to the caller when the decoder buffer is full.
This can be used for libtiff
compatibility. It will use a “relaxed” stream interpretation
that need not contain an explicit EOF. Instead, the decoder is expected to stop fetching
symbols when some out-of-band specified length of the decoded text has been reached. The
caller indicates this maximum length through the available output buffer space.
Symbols afterwards must not be expected to be valid. On filling the output buffer space completely, the decoder will return immediately to the caller instead of potentially interpreting the following bit-stream (and returning an error on doing so).
Default: false
.
Trait Implementations§
Source§impl Clone for Configuration
impl Clone for Configuration
Source§fn clone(&self) -> Configuration
fn clone(&self) -> Configuration
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more