#[repr(u16)]pub enum Method {
Show 13 variants
Store = 0,
Deflate = 8,
Deflate64 = 9,
Bzip2 = 12,
Lzma = 14,
Zstd = 93,
Mp3 = 94,
Xz = 95,
Jpeg = 96,
WavPack = 97,
Ppmd = 98,
Aex = 99,
Unrecognized(u16),
}
Expand description
Compression method used for a file entry.
In archives that follow ISO/IEC 21320-1:2015, only Store and Deflate should be used.
However, in the wild, it is not too uncommon to encounter Bzip2, Lzma or others.
Variants§
Store = 0
No compression is applied
Deflate = 8
Deflate64 = 9
Bzip2 = 12
Lzma = 14
Zstd = 93
Mp3 = 94
Xz = 95
Jpeg = 96
WavPack = 97
Ppmd = 98
Aex = 99
AE-x encryption marker (see Appendix E of appnote)
Unrecognized(u16)
A compression method that isn’t recognized by this crate.
Implementations§
source§impl Method
impl Method
sourcepub fn into_owned(self) -> Method
pub fn into_owned(self) -> Method
Copy the structure and clone the original values if it’s not owned.
This is always a deep copy of the structure.
Trait Implementations§
source§impl FromPrimitive for Method
impl FromPrimitive for Method
impl Copy for Method
impl Eq for Method
impl StructuralPartialEq for Method
Auto Trait Implementations§
impl Freeze for Method
impl RefUnwindSafe for Method
impl Send for Method
impl Sync for Method
impl Unpin for Method
impl UnwindSafe for Method
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)