serializeSegmentedTrie<
V>(trie,codec,options?):Uint8Array
Defined in: packages/trie/src/serialization/binary.ts:106
Serialize a segmented trie as a shared UTF-8 string table, a depth-first parent-pointer node table, and a parallel terminal-value run.
Type Parameters
Section titled “Type Parameters”V
Parameters
Section titled “Parameters”ElementCodec<V>
options?
Section titled “options?”Returns
Section titled “Returns”Uint8Array
Throws
Section titled “Throws”With MISSING_ELEMENT_CODEC when codec is
absent, and with INVALID_SEGMENT, INVALID_CODEC_RESULT,
NON_INJECTIVE_CODEC, or SERIALIZATION_LIMIT_EXCEEDED when the trie cannot
be represented safely.