pub struct File {Show 35 fields
pub version: u8,
pub unknown1: u8,
pub header_len: u16,
pub unknown2: u8,
pub flags: EntryFlags,
pub creation_date: DateTime<Utc>,
pub modification_date: DateTime<Utc>,
pub previous_entry_offset: u32,
pub next_entry_offset: u32,
pub directory_entry_offset: u32,
pub file_name_len: u16,
pub header_crc: u16,
pub data_uncompressed_size: u32,
pub data_compressed_size: u32,
pub data_crc: u16,
pub unknown: u16,
pub data_compression: Algorithm,
pub datakey: Vec<u8>,
pub file_name: String,
pub comment_len: u16,
pub unknown9: u16,
pub comment: String,
pub unknown10: u8,
pub additional_flags: AdditionalFlags,
pub unknown_checksum: u16,
pub file_code: FourCC,
pub creator_code: FourCC,
pub finder_flags: FinderFlags,
pub rsrc_uncompressed_size: u32,
pub rsrc_compressed_size: u32,
pub rsrc_crc: u16,
pub rsrc_unknown: u16,
pub rsrc_compression: Algorithm,
pub res_key: Vec<u8>,
pub index: usize,
/* private fields */
}Expand description
A file entry in v5 archives
Fields§
§version: u8§unknown1: u8§header_len: u16§unknown2: u8§flags: EntryFlags§creation_date: DateTime<Utc>§modification_date: DateTime<Utc>§previous_entry_offset: u32§next_entry_offset: u32§directory_entry_offset: u32§file_name_len: u16§header_crc: u16§data_uncompressed_size: u32§data_compressed_size: u32§data_crc: u16§unknown: u16§data_compression: Algorithm§datakey: Vec<u8>§file_name: String§comment_len: u16§unknown9: u16§comment: String§unknown10: u8§additional_flags: AdditionalFlags§unknown_checksum: u16§file_code: FourCC§creator_code: FourCC§finder_flags: FinderFlags§rsrc_uncompressed_size: u32§rsrc_compressed_size: u32§rsrc_crc: u16§rsrc_unknown: u16§rsrc_compression: Algorithm§res_key: Vec<u8>§index: usizeIndex of the file entry determine by counting previous file entries in depth-first search order
Implementations§
Source§impl File
impl File
pub fn offset(&self, fork: Fork) -> u64
pub fn uncompressed_size(&self, fork: Fork) -> usize
pub fn compressed_size(&self, fork: Fork) -> usize
pub fn compression_method(&self, fork: Fork) -> Algorithm
pub fn checksum(&self, fork: Fork) -> u16
pub fn encrypted(&self, fork: Fork) -> bool
pub fn uses_encryption(&self) -> bool
Trait Implementations§
Source§impl BinRead for File
impl BinRead for File
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl ReadEndian for File
impl ReadEndian for File
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
The endianness of the type.
Source§impl ReadableEntry for File
impl ReadableEntry for File
Source§fn algorithm(&self, fork: Fork) -> Algorithm
fn algorithm(&self, fork: Fork) -> Algorithm
Algorithm used to compress the entry’s data or resource fork
Source§fn compressed_size(&self, fork: Fork) -> usize
fn compressed_size(&self, fork: Fork) -> usize
Amount of bytes occupied by the specified fork
Source§fn uncompressed_size(&self, fork: Fork) -> usize
fn uncompressed_size(&self, fork: Fork) -> usize
Size of the fork in bytes after decompression
fn encrypted(&self, fork: Fork) -> bool
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
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