pub enum Codec {
None,
Lzma,
Lz4,
Lz4Hc,
Lzham,
Other(u8),
}Expand description
A block’s compression, flags & 0x3F.
Variants§
None
0: stored.
Lzma
Lz4
Lz4Hc
Lzham
4: unsupported, as in UnityPy.
Other(u8)
5-63: a custom codec, if one is registered. Only these ids are
canonical: Other(1) names no codec (it is not Lzma), and the
registry refuses and never answers for it (Codec::is_canonical).
Implementations§
Source§impl Codec
impl Codec
Sourcepub fn from_flags(flags: u32) -> Self
pub fn from_flags(flags: u32) -> Self
The codec of a block or blocks-info flags value.
Sourcepub fn is_canonical(self) -> bool
pub fn is_canonical(self) -> bool
Whether this is the value Codec::from_flags gives for its id: every
named variant, and Other(5..=63).
Trait Implementations§
impl Copy for Codec
impl Eq for Codec
impl StructuralPartialEq for Codec
Auto Trait Implementations§
impl Forget for Codec
impl Freeze for Codec
impl Move for Codec
impl RefUnwindSafe for Codec
impl Send for Codec
impl Sync for Codec
impl Unpin for Codec
impl UnsafeUnpin for Codec
impl UnwindSafe for Codec
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