pub struct BundleHeader {
pub signature: String,
pub version: u32,
pub unity_version: String,
pub unity_revision: String,
pub size: u64,
pub compressed_blocks_info_size: u32,
pub uncompressed_blocks_info_size: u32,
pub flags: u32,
pub actual_header_size: u64,
}Expand description
AssetBundle header information
Contains metadata about the bundle including version, compression settings, and structural information needed for parsing the bundle contents.
Fields§
§signature: StringBundle signature (e.g., “UnityFS”, “UnityWeb”, “UnityRaw”)
version: u32Bundle format version
unity_version: StringUnity version that created this bundle
unity_revision: StringUnity revision
size: u64Total bundle size
compressed_blocks_info_size: u32Compressed blocks info size
uncompressed_blocks_info_size: u32Uncompressed blocks info size
flags: u32Archive flags (compression type, block info location, etc.)
actual_header_size: u64Actual header size (recorded during parsing)
Implementations§
Source§impl BundleHeader
impl BundleHeader
Sourcepub fn from_reader(reader: &mut BinaryReader<'_>) -> Result<Self>
pub fn from_reader(reader: &mut BinaryReader<'_>) -> Result<Self>
Parse bundle header from binary data
This method reads the bundle header from a binary reader, handling different bundle formats (UnityFS, UnityWeb, etc.).
Sourcepub fn compression_type(&self) -> Result<CompressionType>
pub fn compression_type(&self) -> Result<CompressionType>
Get the compression type from flags
Sourcepub fn block_info_at_end(&self) -> bool
pub fn block_info_at_end(&self) -> bool
Check if block info is at the end of the file
Sourcepub fn is_unity_fs(&self) -> bool
pub fn is_unity_fs(&self) -> bool
Check if this is a UnityFS format bundle
Sourcepub fn data_offset(&self) -> u64
pub fn data_offset(&self) -> u64
Get the expected data offset after the header
Sourcepub fn header_size(&self) -> u64
pub fn header_size(&self) -> u64
Calculate the size of the header itself
Sourcepub fn format_info(&self) -> BundleFormatInfo
pub fn format_info(&self) -> BundleFormatInfo
Get bundle format information
Trait Implementations§
Source§impl Clone for BundleHeader
impl Clone for BundleHeader
Source§fn clone(&self) -> BundleHeader
fn clone(&self) -> BundleHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more