pub struct RlzCompressor { /* private fields */ }Expand description
Main RLZ compressor class
Implementations§
Source§impl RlzCompressor
impl RlzCompressor
Sourcepub fn builder() -> RlzBuilder
pub fn builder() -> RlzBuilder
Builder used to construct the RLZ compressor
Sourcepub fn encode(
&self,
input: impl Buf,
output: impl BufMut,
) -> Result<usize, Error>
pub fn encode( &self, input: impl Buf, output: impl BufMut, ) -> Result<usize, Error>
Encode a vector of bytes against the dictionary
Sourcepub fn enable_encode(&mut self)
pub fn enable_encode(&mut self)
If RlzCompressor is loaded from disk we rebuild the index to enable encoding
Sourcepub fn decode(&self, input: &[u8], output: impl Write) -> Result<usize, Error>
pub fn decode(&self, input: &[u8], output: impl Write) -> Result<usize, Error>
Decode a vector of bytes that was compressed against the dictionary
Sourcepub fn store(&self, output: impl Write) -> Result<(), Error>
pub fn store(&self, output: impl Write) -> Result<(), Error>
Store the compressor (the dict + config) on disk
Sourcepub fn load(input: impl Read) -> Result<Self, Error>
pub fn load(input: impl Read) -> Result<Self, Error>
Load the compressor (dict + config) without the index for encoding from disk
Sourcepub fn load_and_build_encoder(&self, input: impl Read) -> Result<Self, Error>
pub fn load_and_build_encoder(&self, input: impl Read) -> Result<Self, Error>
Load the compressor (dict + config) and rebuild the index for encoding
Auto Trait Implementations§
impl !Freeze for RlzCompressor
impl !RefUnwindSafe for RlzCompressor
impl Send for RlzCompressor
impl Sync for RlzCompressor
impl Unpin for RlzCompressor
impl !UnwindSafe for RlzCompressor
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