UNPKG

@thi.ng/soa

Version:

SOA & AOS memory mapped structured views with optional & extensible serialization

22 lines 748 B
import type { Vec } from "@thi.ng/vectors"; import type { Serializer, SerializerPair, SerializerSpecs } from "./api.js"; /** * Identity serializer pair (no op). */ export declare const ident: SerializerPair<Vec>; /** * Serializer pair for scalars. */ export declare const scalar: SerializerPair<number>; /** * Zero-terminated UTF-8 string serializer pair for given max length * (incl. final \0 char). * * {@link SerializerPair.encode} throws error if resulting byte sequence * is larger than configured `maxLen`. * * @param maxLen - */ export declare const utf8z: (maxLen: number) => SerializerPair<string>; export declare const serializer: <T extends SerializerSpecs>(specs: T) => Serializer<T>; //# sourceMappingURL=serialize.d.ts.map