The primary interface is defined in the cortex module.
The "Brain" of a node.
fn predict(&self, history: &[u8]) -> u8: Deterministic prediction hot-path.fn adapt(&mut self, signals: &[SpikeEvent]): Neuroplasticity update.fn export_gene(&self) -> Vec<u8>: Serializes the current strategy.
The "Hippocampus" (Persistence Layer).
fn save_gene(&mut self, id: u32, gene: &[u8]) -> bool: Persist strategy to flash/disk.fn load_gene(&self, id: u32) -> Option<Vec<u8>>: Recover strategy on reboot.
The primary interface for QRES is the Rust crate. It is no_std compatible and powers all other bindings.
pub fn compress(data: &[u8], config: CompressionConfig) -> Result<Vec<u8>, QresError>Compresses a byte slice with deterministic behavior.
- data: Input byte slice.
- config: Struct containing
mode(Standard/Tensor),threshold(0.0-1.0), andwindow_size. - Returns:
Vec<u8>containing the compressed bitstream.
pub fn decompress(data: &[u8]) -> Result<Vec<u8>, QresError>Decompresses a QRES stream.
The Python API wraps the Rust core for high-performance usage in scripts and ML pipelines.
- data: Bytes to compress.
- mode:
"standard"(Linear/LZ77) or"tensor"(Tensor/SNN).
- data: Compressed QRES bytes.
The WebAssembly target allows running QRES in the browser.
Sync compression running on the main thread (or worker).
Sync decompression.
For file operations, use the qres_daemon CLI or the QRESFile wrapper (if using the legacy Python helper).
qres_daemon compress <INPUT> [OUTPUT]
qres_daemon decompress <INPUT> [OUTPUT]