pub struct UnfilterBuf<'data> {
pub(crate) buffer: &'data mut [u8],
pub(crate) available: &'data mut usize,
pub(crate) filled: &'data mut usize,
}Expand description
A buffer for decompression and in-place filtering of PNG rowlines.
The underlying data structure is a vector, with additional markers dividing
the vector into specific regions of bytes - see UnfilterRegion for more
details.
Fields§
§buffer: &'data mut [u8]The data container.
available: &'data mut usizeThe past-the-end index of the region that is allowed to be modified.
filled: &'data mut usizeThe past-the-end index of the region with decompressed bytes.
Implementations§
Source§impl UnfilterBuf<'_>
impl UnfilterBuf<'_>
Sourcefn decompress(
&mut self,
decompressor: &mut Decompressor,
input: &[u8],
) -> Result<usize, DecodingError>
fn decompress( &mut self, decompressor: &mut Decompressor, input: &[u8], ) -> Result<usize, DecodingError>
Pushes input into fdeflate crate and appends decompressed bytes to self.buffer
(adjusting self.filled and self.available depending on how many bytes have been
decompressed).
Returns how many bytes of input have been consumed.
Auto Trait Implementations§
impl<'data> Freeze for UnfilterBuf<'data>
impl<'data> RefUnwindSafe for UnfilterBuf<'data>
impl<'data> Send for UnfilterBuf<'data>
impl<'data> Sync for UnfilterBuf<'data>
impl<'data> Unpin for UnfilterBuf<'data>
impl<'data> UnsafeUnpin for UnfilterBuf<'data>
impl<'data> !UnwindSafe for UnfilterBuf<'data>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more