#[repr(C)]pub struct BlockEntry {
pub file_pos: u32,
pub compressed_size: u32,
pub file_size: u32,
pub flags: u32,
}Expand description
Block table entry (16 bytes)
Fields§
§file_pos: u32Offset of the beginning of the file data, relative to the beginning of the archive
compressed_size: u32Compressed file size
file_size: u32Size of uncompressed file
flags: u32Flags for the file
Implementations§
Source§impl BlockEntry
impl BlockEntry
Sourcepub const FLAG_IMPLODE: u32 = 0x00000100
pub const FLAG_IMPLODE: u32 = 0x00000100
File is compressed using PKWARE Data compression library
Sourcepub const FLAG_COMPRESS: u32 = 0x00000200
pub const FLAG_COMPRESS: u32 = 0x00000200
File is compressed using one or more compression methods
Sourcepub const FLAG_ENCRYPTED: u32 = 0x00010000
pub const FLAG_ENCRYPTED: u32 = 0x00010000
File is encrypted
Sourcepub const FLAG_FIX_KEY: u32 = 0x00020000
pub const FLAG_FIX_KEY: u32 = 0x00020000
The decryption key for the file is adjusted by the block position
Sourcepub const FLAG_PATCH_FILE: u32 = 0x00100000
pub const FLAG_PATCH_FILE: u32 = 0x00100000
The file is a patch file
Sourcepub const FLAG_SINGLE_UNIT: u32 = 0x01000000
pub const FLAG_SINGLE_UNIT: u32 = 0x01000000
File is stored as a single unit, not split into sectors
Sourcepub const FLAG_DELETE_MARKER: u32 = 0x02000000
pub const FLAG_DELETE_MARKER: u32 = 0x02000000
File is a deletion marker
Sourcepub const FLAG_SECTOR_CRC: u32 = 0x04000000
pub const FLAG_SECTOR_CRC: u32 = 0x04000000
File has checksums for each sector
Sourcepub const FLAG_EXISTS: u32 = 0x80000000
pub const FLAG_EXISTS: u32 = 0x80000000
File exists in the archive
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 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 has_fix_key(&self) -> bool
pub fn has_fix_key(&self) -> bool
Check if the file uses fixed key encryption
Sourcepub fn is_patch_file(&self) -> bool
pub fn is_patch_file(&self) -> bool
Check if the file is a patch file
Sourcepub fn from_bytes(data: &[u8]) -> Result<Self>
pub fn from_bytes(data: &[u8]) -> Result<Self>
Read a block entry from raw bytes
Source§impl BlockEntry
impl BlockEntry
Sourcepub fn is_imploded(&self) -> bool
pub fn is_imploded(&self) -> bool
Check if file uses PKWARE implode compression
Trait Implementations§
Source§impl Clone for BlockEntry
impl Clone for BlockEntry
Source§fn clone(&self) -> BlockEntry
fn clone(&self) -> BlockEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlockEntry
impl Debug for BlockEntry
impl Copy for BlockEntry
Auto Trait Implementations§
impl Freeze for BlockEntry
impl RefUnwindSafe for BlockEntry
impl Send for BlockEntry
impl Sync for BlockEntry
impl Unpin for BlockEntry
impl UnwindSafe for BlockEntry
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
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>
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>
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