pub struct FileInfo {
pub filename: String,
pub hash_index: usize,
pub block_index: usize,
pub file_pos: u64,
pub compressed_size: u64,
pub file_size: u64,
pub flags: u32,
pub locale: u16,
}Expand description
Information about a file in the archive
Fields§
§filename: StringFile name
hash_index: usizeIndex in hash table
block_index: usizeIndex in block table
file_pos: u64Absolute file position in archive file
compressed_size: u64Compressed size
file_size: u64Uncompressed size
flags: u32File flags
locale: u16File locale
Implementations§
Source§impl FileInfo
impl FileInfo
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Check if the file is compressed
Sourcepub fn is_encrypted(&self) -> bool
pub fn is_encrypted(&self) -> bool
Check if the file is encrypted
Sourcepub fn has_fix_key(&self) -> bool
pub fn has_fix_key(&self) -> bool
Check if the file has fixed key encryption
Sourcepub fn is_single_unit(&self) -> bool
pub fn is_single_unit(&self) -> bool
Check if the file is stored as a single unit
Sourcepub fn has_sector_crc(&self) -> bool
pub fn has_sector_crc(&self) -> bool
Check if the file has sector CRCs
Sourcepub fn is_patch_file(&self) -> bool
pub fn is_patch_file(&self) -> bool
Check if the file is a patch file
Sourcepub fn is_implode(&self) -> bool
pub fn is_implode(&self) -> bool
Check if the file uses IMPLODE compression specifically
Sourcepub fn uses_compression_prefix(&self) -> bool
pub fn uses_compression_prefix(&self) -> bool
Check if the file uses COMPRESS (multi-method compression)
Sourcepub fn get_compression_method(&self) -> Option<u8>
pub fn get_compression_method(&self) -> Option<u8>
Extract compression method from block table flags Returns the compression method byte that should be used for decompression
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileInfo
impl RefUnwindSafe for FileInfo
impl Send for FileInfo
impl Sync for FileInfo
impl Unpin for FileInfo
impl UnwindSafe for FileInfo
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> 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