pub enum ESpec {
None,
ZLib {
level: Option<u8>,
bits: Option<ZLibBits>,
},
Encrypted {
key: String,
iv: Vec<u8>,
spec: Box<ESpec>,
},
BlockTable {
chunks: Vec<BlockChunk>,
},
BCPack {
bcn: u8,
},
GDeflate {
level: u8,
},
}
Expand description
Encoding specification (ESpec) defining how to encode/compress data
Variants§
None
No compression (‘n’)
ZLib
ZLib compression (‘z’)
Encrypted
Encryption (‘e’)
BlockTable
Block table (‘b’)
Fields
§
chunks: Vec<BlockChunk>
BCPack
BCPack compression (‘c’)
GDeflate
GDeflate compression (‘g’)
Implementations§
Source§impl ESpec
impl ESpec
Sourcepub fn is_encrypted(&self) -> bool
pub fn is_encrypted(&self) -> bool
Check if this ESpec uses encryption
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Check if this ESpec uses compression
Sourcepub fn compression_type(&self) -> &str
pub fn compression_type(&self) -> &str
Get the compression type as a string
Trait Implementations§
impl StructuralPartialEq for ESpec
Auto Trait Implementations§
impl Freeze for ESpec
impl RefUnwindSafe for ESpec
impl Send for ESpec
impl Sync for ESpec
impl Unpin for ESpec
impl UnwindSafe for ESpec
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