bcp-decoder 0.1.0

Streaming decoder for the Bit Context Protocol binary format
Documentation

BCP decoder — parses binary payloads into typed blocks.

Two APIs are provided:

  • [BcpDecoder] — synchronous, operates on a complete &[u8] slice.
  • [StreamingDecoder] — asynchronous, reads from any AsyncRead source and yields blocks incrementally. Requires the streaming feature (enabled by default).

Compression and streaming: The streaming decoder provides true incremental parsing for uncompressed and per-block-compressed payloads. However, whole-payload compression (HeaderFlags::COMPRESSED) forces the streaming decoder to buffer the entire payload before yielding blocks — the streaming API surface is preserved but the memory and latency benefits are lost. Prefer per-block compression when streaming matters.