Skip to main content

Module expr_serialize

Module expr_serialize 

Source
Expand description

Expression serialization for TLExpr and EinsumGraph.

Provides custom S-expression text format and compact binary format for serializing/deserializing logical expressions and computation graphs. This enables saving/loading compiled expressions for caching, transfer, and debugging.

Structs§

SerializationStats
Statistics about the serialized form of a TLExpr.

Enums§

ExprFormat
Serialization format selector.
ExprSerializeError
Error type for serialization operations.

Functions§

batch_from_binary
Deserialize multiple expressions from a batch binary blob.
batch_to_binary
Serialize multiple expressions efficiently into a single binary blob.
binary_equal
Compare two serialized binary forms for equality without deserializing.
expr_fingerprint
Compute a 64-bit FNV-1a hash/fingerprint of a TLExpr for caching.
from_binary
Deserialize a TLExpr from binary bytes.
from_sexpr
Parse a TLExpr from an S-expression string.
graph_from_binary
Deserialize an EinsumGraph from binary bytes.
graph_to_binary
Serialize an EinsumGraph to binary bytes.
to_binary
Serialize a TLExpr to compact binary bytes.
to_sexpr
Serialize a TLExpr to an S-expression string.