Build from rows the caller already holds: rows.length === n * bytesPerVector,
in the order of ids. The core sorts by id, rejects duplicates and
non-canonical rows, copies the rows once and computes both digests.
idKind is required when there are no ids.
SHA-256 identity of the rows under the rule (32 bytes).
Sorted ids: bigint[] for u64, string[] for utf8 (a copy).
Number of rows.
Manifest pairs in canonical (bytewise key) order, as a plain object
whose every key is an own property (a key named __proto__ included).
Canonical rows in id order, n * bytesPerVector bytes (a copy).
Identity of rows plus manifest (32 bytes).
[id, row] pairs in canonical order.
Release the native handle. Idempotent; later use raises InvalidInput. A Diff built from this Encoding stays valid.
True when other has the same stateId: the same rows under the same rule, with the same manifest.
The row of id (a copy), or undefined when absent. InvalidInput for
an id of the wrong kind.
Row i in id order (a copy).
The file image.
Encoding(3 rows, quant(dim=4, bins=4), state_id 40c3aa20252d...); the same text in every binding.
StaticfromParse a complete file image. Validates framing, sizes, ids, manifest, both digests and row canonicity; always copies.
An immutable set of ids with one canonical row each, a manifest and two identities.
contentDigestidentifies the rows under the rule;stateIdadds the manifest. Equality of two Encodings is equality ofstateId. Every accessor returns a copy; the rows live in wasm memory until Encoding.dispose or the finalizer runs.