Struct jxl_bitstream::Bitstream
source · pub struct Bitstream<R> { /* private fields */ }Expand description
JPEG XL bitstream reader.
Implementations§
source§impl<R> Bitstream<ContainerDetectingReader<R>>
impl<R> Bitstream<ContainerDetectingReader<R>>
sourcepub fn new_detect(reader: R) -> Self
pub fn new_detect(reader: R) -> Self
Creates a bitstream reader which detects the container format automatically.
source§impl<R> Bitstream<R>
impl<R> Bitstream<R>
pub fn into_inner(self) -> R
pub fn bookmark(&self) -> Bookmark
pub fn rewindable(&mut self) -> Bitstream<RewindMarker<'_, R>>
source§impl<R: Read> Bitstream<R>
impl<R: Read> Bitstream<R>
pub fn read_bits(&mut self, n: u32) -> Result<u32>
sourcepub fn read_bool(&mut self) -> Result<bool>
pub fn read_bool(&mut self) -> Result<bool>
Reads a Bool as defined in the JPEG XL specification.
sourcepub fn read_f16_as_f32(&mut self) -> Result<f32>
pub fn read_f16_as_f32(&mut self) -> Result<f32>
Reads an F16 as defined in the JPEG XL specification, and convert it to f32.
Errors
Returns Error::InvalidFloat if the value is NaN or Infinity.
sourcepub fn zero_pad_to_byte(&mut self) -> Result<()>
pub fn zero_pad_to_byte(&mut self) -> Result<()>
Performs ZeroPadToByte as defined in the JPEG XL specification.
pub fn read_bundle<B: Bundle<()>>(&mut self) -> Result<B, B::Error>
pub fn read_bundle_with_ctx<B: Bundle<Ctx>, Ctx>( &mut self, ctx: Ctx ) -> Result<B, B::Error>
pub fn skip_to_bookmark(&mut self, Bookmark: Bookmark) -> Result<()>
pub fn read_bytes_aligned(&mut self, buf: &mut [u8]) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl<R> RefUnwindSafe for Bitstream<R>where R: RefUnwindSafe,
impl<R> Send for Bitstream<R>where R: Send,
impl<R> Sync for Bitstream<R>where R: Sync,
impl<R> Unpin for Bitstream<R>where R: Unpin,
impl<R> UnwindSafe for Bitstream<R>where R: UnwindSafe,
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