Expand description
BCP decoder — parses binary payloads into typed blocks.
Two APIs are provided:
BcpDecoder— synchronous, operates on a complete&[u8]slice.StreamingDecoder— asynchronous, reads from anyAsyncReadsource and yields blocks incrementally. Requires thestreamingfeature (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.
Re-exports§
pub use decoder::DecodedPayload;pub use decoder::BcpDecoder;pub use error::DecodeError;pub use streaming::DecoderEvent;pub use streaming::StreamingDecoder;