You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm confused about how can I implement this file type:
#[binrw]pubstructVfsEntry{offset:u32,size:u32,}#[binrw]pubstructVfs{#[br(temp)]#[bw(try_calc(u32::try_from(_entries.len())))]_file_count:u32,#[br(temp, count = _file_count)]#[bw(/* Not sure here */)]_entries:Vec<VfsEntry>,// Not sure here// entries: Vec<Vec<u8>>}
There are these 2 examples where the header contains:
How can I create this entries field that contains _file_count entries with the corresponding slice they are pointing to?
Also, how can I generate Vec<VfsEntry> field when writing this file format to binary?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello! Thank you for the crate.
I'm confused about how can I implement this file type:
There are these 2 examples where the header contains:
But I'm having trouble combining these examples.
How can I create this
entries
field that contains_file_count
entries with the corresponding slice they are pointing to?Also, how can I generate
Vec<VfsEntry>
field when writing this file format to binary?Thank you so much!
Beta Was this translation helpful? Give feedback.
All reactions