pub struct DcxHeader {
pub mode: Mode,
pub format_hint: FormatHint,
pub original_size: u64,
pub compressed_size: u64,
pub crc32: u32,
pub transform_metadata: Vec<u8>,
pub has_dict: bool,
pub meta_compressed: bool,
pub use_brotli: bool,
pub meta_embedded: bool,
}Expand description
.dcx file header.
Fields§
§mode: Mode§format_hint: FormatHint§original_size: u64§compressed_size: u64§crc32: u32§transform_metadata: Vec<u8>§has_dict: boolTrue if the compressed payload embeds a zstd dictionary.
meta_compressed: boolTrue if transform_metadata is zstd-compressed (bit 2 of flags).
use_brotli: boolTrue if compressed with brotli instead of zstd (bit 3 of flags).
meta_embedded: boolTrue if transform metadata is embedded in the compressed stream (bit 4 of flags).
When set, the header’s transform_metadata is empty; metadata lives inside the
decompressed payload as [meta_len:u32 LE][raw_metadata][preprocessed_data].
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DcxHeader
impl RefUnwindSafe for DcxHeader
impl Send for DcxHeader
impl Sync for DcxHeader
impl Unpin for DcxHeader
impl UnsafeUnpin for DcxHeader
impl UnwindSafe for DcxHeader
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more