pub struct Lz4BlockOutputBase<'a, W: Write + Sized, C: Compression> { /* private fields */ }
Expand description
Wrapper around a Write
object to compress data.
Use this struct only if you want to provide your own Compression implementation. Otherwise use the alias Lz4BlockOutput
.
Implementations§
Source§impl<'a, W: Write> Lz4BlockOutputBase<'a, W, Context>
impl<'a, W: Write> Lz4BlockOutputBase<'a, W, Context>
Sourcepub fn new(w: &'a mut W) -> Self
pub fn new(w: &'a mut W) -> Self
Create a new Lz4BlockOutput
with the default parameters.
Source§impl<'a, W: Write, C: Compression> Lz4BlockOutputBase<'a, W, C>
impl<'a, W: Write, C: Compression> Lz4BlockOutputBase<'a, W, C>
Sourcepub fn default_block_size() -> usize
pub fn default_block_size() -> usize
Get the default block size: 65536B.
Sourcepub fn with_context(w: &'a mut W, c: C, block_size: usize) -> Result<Self>
pub fn with_context(w: &'a mut W, c: C, block_size: usize) -> Result<Self>
Create a new Lz4BlockOutputBase
with the default checksum implementation which is compatible with the Java’s default implementation, including the missing 4 bits bug.
Trait Implementations§
Source§impl<'a, W: Debug + Write + Sized, C: Debug + Compression> Debug for Lz4BlockOutputBase<'a, W, C>
impl<'a, W: Debug + Write + Sized, C: Debug + Compression> Debug for Lz4BlockOutputBase<'a, W, C>
Source§impl<'a, W: Write, C: Compression> Drop for Lz4BlockOutputBase<'a, W, C>
impl<'a, W: Write, C: Compression> Drop for Lz4BlockOutputBase<'a, W, C>
Source§impl<'a, W: Write, C: Compression> Write for Lz4BlockOutputBase<'a, W, C>
impl<'a, W: Write, C: Compression> Write for Lz4BlockOutputBase<'a, W, C>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl<'a, W, C> Freeze for Lz4BlockOutputBase<'a, W, C>where
C: Freeze,
impl<'a, W, C> RefUnwindSafe for Lz4BlockOutputBase<'a, W, C>where
C: RefUnwindSafe,
W: RefUnwindSafe,
impl<'a, W, C> Send for Lz4BlockOutputBase<'a, W, C>
impl<'a, W, C> Sync for Lz4BlockOutputBase<'a, W, C>
impl<'a, W, C> Unpin for Lz4BlockOutputBase<'a, W, C>where
C: Unpin,
impl<'a, W, C> !UnwindSafe for Lz4BlockOutputBase<'a, W, C>
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