#stream #libframing

libframing

Length-prefixed framing for byte streams

1 unstable release

Uses new Rust 2024

0.1.0 Apr 14, 2025

#190 in #stream

Download history 58/week @ 2025-04-08 43/week @ 2025-04-15

101 downloads per month

AGPL-3.0

3KB

Length-prefixed framing for byte streams. Similar to Tokio's codec module or Ogg.

Structures:

  • Framer - Takes datagrams and returns a byte stream.
  • Deframer - Takes a byte stream and returns datagrams.
  • Multiplexer - Takes multiple byte streams and returns one byte stream.
  • Demultiplexer - Takes one byte stream and returns multiple byte streams.
  • MultiFramer - A convenience wrapper around Framers and a Multiplexer, which takes datagrams of multiple streams and returns one byte stream.
  • DeMultiFramer - A convenience wrapper around Deframers and a Demultiplexer, which takes one byte stream and returns datagrams of multiple streams.

Links

No runtime deps