Expand description
Deterministic binary persistence for NumericFeatureBufferStore.
The format .n4d (DAG-ML Data file) is a versioned little-endian byte
stream sealed with a SHA-256 trailer so a host can persist a provider’s
feature buffers between processes and detect tampering on reload. The
serializer iterates the store in BTreeMap order so byte-identical stores
produce byte-identical files; deserialization rebuilds the store using
the same column-major typed input path as the in-memory ABI, so a
round-trip preserves every buffer fingerprint.
Constants§
Functions§
- deserialize_
columnar_ store - Parse a
.n4dbyte stream back into a store. Rejects unknown magic, unsupported versions, truncated streams, and any tampering of the payload caught by SHA-256 mismatch. - read_
store_ from_ path - Read a store back from
path. Errors propagate the validation failure fromdeserialize_columnar_storealongside the path for diagnostics. - serialize_
columnar_ store - Serialize a store to its deterministic
.n4dbyte stream. The output ends with a 32-byte SHA-256 of all preceding bytes so callers can distinguish truncation from intentional empty stores and detect any later tampering throughdeserialize_columnar_store. - write_
store_ to_ path - Write a store to
path. Replaces any existing file at the destination.