Skip to main content

Crate cynos_binary

Crate cynos_binary 

Source
Expand description

Binary Protocol for high-performance row serialization.

Provides a compact binary encoding format for transferring row data. When the wasm feature is enabled, includes zero-copy WASM bindings for direct JS access to encoded buffers.

§Binary Format (Row-Major)

Header: 16 bytes
+----------+----------+------------+-------+
| row_count| row_stride| var_offset | flags |
| u32      | u32       | u32        | u32   |
+----------+----------+------------+-------+

Fixed Section (row-major):
Row 0: [null_mask: ceil(cols/8) bytes][col0][col1][col2]
Row 1: [null_mask][col0][col1][col2]
...

Variable Section:
[string bytes][bytes data][jsonb data]

Modules§

flags
Header flags

Structs§

BinaryEncoder
High-performance binary encoder
BinaryResult
Binary result buffer returned from execBinary()
ColumnLayout
Layout information for a single column
SchemaLayout
Pre-computed layout for binary encoding/decoding
SchemaLayoutCache
Cache for SchemaLayout instances.

Enums§

BinaryDataType
Data type IDs for binary encoding

Constants§

HEADER_SIZE
Header size in bytes