Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Examples

Examples are host programs, not part of the library. They show how to own the transport while keeping predsync responsible for bytes and predictor state.

  • Generated wrappers — typed Rust structs built at compile time.
  • UDP — datagram transport with a deterministic loopback self-test.
  • Python UDP — generated Python wrappers, lossy-link recovery and Ctrl-C encode statistics.
  • Serial and COBS — byte-stream framing with a COBS delimiter.
  • ROS 2 — r2r publisher/subscriber with best-effort QoS.
  • C quickstart — minimal C ABI encode/decode sequence.

The long-running senders (UDP, Python UDP, serial/COBS and the ROS 2 talker) print Ctrl-C summaries with predicted fields, byte savings, percentage size reduction and message sizes.

All examples use the same telemetry schema: a quantised linear-predicted numeric field, a hold_last enum, a hold_last string and an always-included list.

The host must supply framing and buffering. predsync does not scan byte streams for frames, retransmit, or infer a sender from a message ID.