pub struct Lz4StreamDecoder { /* private fields */ }Expand description
Incremental chunk-resumable LZ4 block decoder enabling cooperative <= 1.5 ms/frame time-sliced decompression.
Implementations§
Source§impl Lz4StreamDecoder
Chunk-resumable LZ4 block decoding routines for Lz4StreamDecoder.
impl Lz4StreamDecoder
Chunk-resumable LZ4 block decoding routines for Lz4StreamDecoder.
Sourcepub fn decoded_bytes(&self) -> usize
pub fn decoded_bytes(&self) -> usize
Returns the number of uncompressed bytes decoded so far.
§Returns
usize- Decoded output byte cursor.
Sourcepub fn decoded_slice(&self) -> &[u8] ⓘ
pub fn decoded_slice(&self) -> &[u8] ⓘ
Returns the already-decoded uncompressed prefix slice up to decoded_bytes().
§Returns
&[u8]- Decoded output prefix slice.
Sourcepub fn decode_up_to_bytes(
&mut self,
input: &[u8],
max_output_bytes: usize,
) -> Result<bool, String>
pub fn decode_up_to_bytes( &mut self, input: &[u8], max_output_bytes: usize, ) -> Result<bool, String>
Decodes LZ4 sequences from input until at least max_output_bytes are produced in this slice or the block completes.
§Arguments
&[u8]- Complete LZ4 compressed block slice.usize- Soft maximum uncompressed output bytes to decode during this cooperative slice.
§Returns
Result<bool, String>-Ok(true)when the entire LZ4 block has finished decoding,Ok(false)when paused for the next frame slice.
Trait Implementations§
Source§impl Clone for Lz4StreamDecoder
impl Clone for Lz4StreamDecoder
Auto Trait Implementations§
impl Forget for Lz4StreamDecoder
impl Freeze for Lz4StreamDecoder
impl Move for Lz4StreamDecoder
impl RefUnwindSafe for Lz4StreamDecoder
impl Send for Lz4StreamDecoderwhere
RawVecInner: Send,
impl Sync for Lz4StreamDecoderwhere
RawVecInner: Sync,
impl Unpin for Lz4StreamDecoder
impl UnsafeUnpin for Lz4StreamDecoder
impl UnwindSafe for Lz4StreamDecoderwhere
RawVecInner: 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