pub fn write_dataset_with_metadata(
dict: &Dictionary,
default_index: &GraphIndex,
named: &[(String, GraphIndex)],
has_quads: bool,
pyramid_meta: &[u8],
pyramid_levels: u16,
metadata: &[u8],
text_index: &[u8],
) -> Vec<u8> ⓘExpand description
Serialize a dataset with an opaque metadata payload occupying the file’s
metadata section (the application layer defines its meaning — the CLI stores a
JSON Dataset Card there). The section sits immediately after the header and
before the dictionary, so metadata_offset stays at HEADER_LEN and every
downstream section shifts by metadata.len(). The payload is folded into the
content_hash, so verify covers it and it is tamper-evident.
Passing an empty metadata is byte-identical to write_dataset: the section
is omitted (metadata_len = 0, dictionary_offset = HEADER_LEN) and the hash
is computed over exactly the same parts (a zero-length hash update is a no-op).