Struct gif::StreamingDecoder
source · pub struct StreamingDecoder { /* private fields */ }
Expand description
GIF decoder which supports streaming
Implementations§
source§impl StreamingDecoder
impl StreamingDecoder
sourcepub fn new() -> StreamingDecoder
pub fn new() -> StreamingDecoder
Creates a new streaming decoder
sourcepub fn update<'a>(
&'a mut self,
buf: &[u8]
) -> Result<(usize, Decoded<'a>), DecodingError>
pub fn update<'a>( &'a mut self, buf: &[u8] ) -> Result<(usize, Decoded<'a>), DecodingError>
Updates the internal state of the decoder.
Returns the number of bytes consumed from the input buffer and the last decoding result.
sourcepub fn last_ext(&self) -> (AnyExtension, &[u8], bool)
pub fn last_ext(&self) -> (AnyExtension, &[u8], bool)
Returns the data of the last extension that has been decoded.
sourcepub fn current_frame_mut<'a>(&'a mut self) -> &'a mut Frame<'static>
pub fn current_frame_mut<'a>(&'a mut self) -> &'a mut Frame<'static>
Current frame info as a mutable ref.
sourcepub fn current_frame<'a>(&'a self) -> &'a Frame<'static>
pub fn current_frame<'a>(&'a self) -> &'a Frame<'static>
Current frame info as a ref.
sourcepub fn version(&self) -> Version
pub fn version(&self) -> Version
The version number of the GIF standard used in this image.
We suppose a minimum of V87a
compatibility. This value will be reported until we have
read the version information in the magic header bytes.
sourcepub fn set_extensions(&mut self, extensions: Extensions)
👎Deprecated: Does not work as intended. In fact, doesn’t do anything. This may disappear soon.
pub fn set_extensions(&mut self, extensions: Extensions)
Configure whether extensions are saved or skipped.