pub struct Lzma;Available on crate feature
lzma only.Expand description
The LZMA1 codec (self-implemented .lzma alone format).
Implementations§
Source§impl Lzma
impl Lzma
Sourcepub fn compress(&self, input: &[u8]) -> Vec<u8> ⓘ
Available on crate feature enc only.
pub fn compress(&self, input: &[u8]) -> Vec<u8> ⓘ
enc only.Compress input.
Sourcepub fn decompress(
&self,
input: &[u8],
orig_len: usize,
) -> Result<Vec<u8>, Error>
Available on crate feature dec only.
pub fn decompress( &self, input: &[u8], orig_len: usize, ) -> Result<Vec<u8>, Error>
dec only.Decompress input, which must expand to exactly orig_len bytes.
§Errors
Returns Error::Truncated if the stream ends mid-symbol, and
Error::Corrupt if the .lzma header is malformed, if the size it
records or the decoded output disagrees with orig_len, or if
orig_len is more than this target can allocate.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lzma
impl RefUnwindSafe for Lzma
impl Send for Lzma
impl Sync for Lzma
impl Unpin for Lzma
impl UnsafeUnpin for Lzma
impl UnwindSafe for Lzma
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