pub struct ArchiveHeader {
pub file_code: FourCC,
pub entry_count: u16,
pub archive_len: u32,
pub version: Version,
pub reserved: [u8; 7],
}Fields§
§file_code: FourCCFile identifier, this should be ‘SIT!’, ‘SITD’, ‘SIT2’ or ‘SIT5’.
If it says ‘Stuf’ you are probably dealing with a version 5 archive instead
entry_count: u16Number of entries in the root of the archive
archive_len: u32total size of the archive file in bytes (including header and everything)
version: VersionFile format (sub-)version
reserved: [u8; 7]Reserved for future use (in v1)
- if
version==1this is set to 00 00 00 00 00 00 00 - if
version==2this is set to XX NN NN NN NN XX XX where NN NN NN NN is the offset to the first root entry from the start of the file in bytes
Implementations§
Source§impl ArchiveHeader
impl ArchiveHeader
pub fn first_entry_offset(&self) -> u64
Trait Implementations§
Source§impl BinRead for ArchiveHeader
impl BinRead for ArchiveHeader
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 Debug for ArchiveHeader
impl Debug for ArchiveHeader
Source§impl ReadEndian for ArchiveHeader
impl ReadEndian for ArchiveHeader
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
The endianness of the type.
Auto Trait Implementations§
impl Freeze for ArchiveHeader
impl RefUnwindSafe for ArchiveHeader
impl Send for ArchiveHeader
impl Sync for ArchiveHeader
impl Unpin for ArchiveHeader
impl UnwindSafe for ArchiveHeader
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