pub struct FlateScanlineDecoder { /* private fields */ }Expand description
Scanline decoder for FlateDecode (zlib/deflate) data.
Decompresses the full data internally on construction, then yields
row_stride bytes per decode_scanline call.
Implementations§
Source§impl FlateScanlineDecoder
impl FlateScanlineDecoder
Trait Implementations§
Source§impl ScanlineDecoder for FlateScanlineDecoder
impl ScanlineDecoder for FlateScanlineDecoder
Source§fn comps_count(&self) -> u8
fn comps_count(&self) -> u8
Number of color components per pixel (e.g. 1 for gray, 3 for RGB, 4
for CMYK). Mirrors PDFium’s
CountComps().Source§fn row_stride(&self) -> usize
fn row_stride(&self) -> usize
Number of bytes per row:
(width * comps_count * bpc + 7) / 8.Source§fn decode_scanline(&mut self) -> Result<Option<&[u8]>, DecodeError>
fn decode_scanline(&mut self) -> Result<Option<&[u8]>, DecodeError>
Decode and return the next scanline. Read more
Source§fn current_line(&self) -> Option<usize>
fn current_line(&self) -> Option<usize>
Current line index (0-based), or
None if no lines have been read yet.Source§fn get_height(&self) -> u32
fn get_height(&self) -> u32
Upstream alias for
height(). Mirrors PDFium’s GetHeight().Source§fn count_comps(&self) -> u8
fn count_comps(&self) -> u8
Upstream alias for
comps_count(). Mirrors PDFium’s CountComps().Source§fn skip_to_scanline(&mut self, target: usize)
fn skip_to_scanline(&mut self, target: usize)
Skip ahead to scanline
target by decoding and discarding intermediate lines. Read moreSource§fn src_offset(&self) -> Option<usize>
fn src_offset(&self) -> Option<usize>
Returns the byte offset of the current source position in the compressed stream, if available. Read more
Source§fn get_src_offset(&self) -> Option<usize>
fn get_src_offset(&self) -> Option<usize>
Upstream alias for
src_offset(). Mirrors PDFium’s GetSrcOffset().Auto Trait Implementations§
impl Freeze for FlateScanlineDecoder
impl RefUnwindSafe for FlateScanlineDecoder
impl Send for FlateScanlineDecoder
impl Sync for FlateScanlineDecoder
impl Unpin for FlateScanlineDecoder
impl UnsafeUnpin for FlateScanlineDecoder
impl UnwindSafe for FlateScanlineDecoder
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