feagi-serialization
Efficient serialization and deserialization for FEAGI data structures
Overview
feagi-serialization provides high-performance serialization and deserialization for FEAGI data structures. This crate implements the FEAGI Byte Container (FBC) format for efficient binary encoding of neural data.
Features
- FEAGI Byte Container (FBC): Efficient binary container format
- Multiple Structure Types: Support for JSON, raw images, and XYZP neuron data
- Cortical Mapped Data: Serialization for cortical-area-mapped neuron voxels
- Zero-Copy Operations: Where possible, for maximum performance
- Type-Safe Deserialization: Strongly typed structure identification
Installation
Add this to your Cargo.toml:
[]
= "0.0.1-beta.1"
= "0.0.1-beta.1"
Usage
FEAGI Byte Container
use ;
// Create a container with JSON data
let json_data = br#"{"cortical_id": "ipu000", "data": [1,2,3]}"#;
let container = new;
// Serialize to bytes
let bytes = container.to_bytes;
// Deserialize from bytes
let decoded = from_bytes?;
Cortical Mapped XYZP Data
use CorticalMappedXYZPNeuronVoxels;
use CorticalID;
// Create neuron data mapped to cortical areas
let cortical_id = from_base_64?;
let mut data = new;
// Add voxels for a cortical area
data.insert;
// Serialize efficiently
let bytes = data.serialize_to_bytes;
Supported Structure Types
- JSON (Type 0x01): Standard JSON encoding
- Single Raw Image (Type 0x08): Raw image data
- XYZP Neuron Data (Type 0x0B): Neuron voxel potential data
See documentation for the complete format specification.
Performance
The FBC format is designed for high-throughput neural data transmission:
- Minimal overhead (8-byte header)
- Type identification for fast routing
- Optional compression support
- Efficient for large batches of neuron data
Documentation
For detailed API documentation, visit docs.rs/feagi-serialization.
For format specifications, see the docs/ directory.
Part of FEAGI Ecosystem
This crate is part of the FEAGI project:
- Main Project: feagi
- Data Structures: feagi-structures
- Sensorimotor: feagi-sensorimotor
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Contributing
Contributions are welcome! Please see the main repository for contribution guidelines.
Links
- Homepage: https://feagi.org
- Repository: https://github.com/feagi/feagi-core
- Documentation: https://docs.rs/feagi-serialization
- Issue Tracker: https://github.com/feagi/feagi-core/issues