Struct lz4_java_wrc::Lz4BlockOutputBase
source · 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>
Write a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush 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> 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