todo: header machinery in file (file.add_block)

This commit is contained in:
Quaternions 2024-07-25 16:07:26 -07:00
parent 47aef14ff3
commit 4abeefa7e8

View File

@ -51,19 +51,19 @@ pub(crate) enum FourCC{
} }
#[binrw] #[binrw]
#[brw(little)] #[brw(little)]
struct Header{ pub struct Header{
/// Type of file /// Type of file
fourcc:FourCC, pub fourcc:FourCC,
/// Type version /// File format version
version:u32, pub version:u32,
/// Minimum data required to know the location of all streamable resources for this specific file /// Minimum data required to know the location of all streamable resources for this specific file
priming:u64, pub priming:u64,
/// uuid for this file /// uuid for this file
resource:u128, pub resource:u128,
//don't need try_calc: the struct will force field initialization anyways and it can be calculated there //don't need try_calc: the struct will force field initialization anyways and it can be calculated there
block_count:u32, pub block_count:u32,
#[br(count=block_count+1)] #[br(count=block_count+1)]
block_location:Vec<u64>, pub block_location:Vec<u64>,
} }
#[binrw] #[binrw]