pub fn append_sections(
image: &[u8],
sections: &[(SectionKind, &[u8])],
) -> Result<Vec<u8>, FileError>Expand description
Append LABEL_INDEX / SCHEMA sections (kinds 8, 9) to a finished file image, just before its 4-byte footer, and return the new image.
They sit outside the content hash, so nothing before them moves and the hash is unchanged: only the header’s directory gains entries. An empty payload is skipped. Each kind may be appended once; a second append of a kind the file already carries is an error, as is any other kind.