Incremental streaming decoder for 0x00-delimited COBS frames.
Feed incoming wire bytes either one byte at a time (Process(std::byte)) or in chunks (Process(ConstByteSpan, callback)). Back-to-back 0x00 delimiters are ignored as idle line bytes.
Public Member Functions | |
| constexpr | Decoder (ByteSpan decode_buffer) |
| void | Clear () |
| Discards any partially received frame and resets the decoder to idle. | |
| constexpr bool | in_progress () const |
| Result< ByteSpan > | Process (std::byte b) |
| template<typename Callback > | |
| void | Process (ConstByteSpan data, Callback &&callback) |
Friends | |
| Result< ByteSpan > | Decode (ConstByteSpan encoded, ByteSpan output) |