Struct fldtools::ChunkList
[−]
[src]
pub struct ChunkList { pub chunks: Vec<Chunk>, }
Represents the header of an FLD file. A ChunkList is a simple collection of one or more data chunks.
Fields
chunks: Vec<Chunk>
Methods
impl ChunkList
[src]
fn build(files: &[usize]) -> ChunkList
Builds a ChunkList given a list of file sizes. This will calculate offsets for each file to be packed within an FLD file and use that to generate a set of Chunks.
fn parse(data: &[u8]) -> Result<ChunkList>
Parses an FLD header from raw data, and returns a ChunkList.
This skips any portion of the header which begins with 0xFF
,
since FLD files are padded using sets of 0xFF
s.
fn serialize(&self) -> Result<Vec<u8>>
Serializes this ChunkList into its binary representation.