flood-rs
A Rust library for reading and writing octet streams, facilitating custom serialization and deserialization.
Overview
flood-rs provides traits and implementations for working with networked ordered, big endian octet streams.
It defines the WriteOctetStream
and ReadOctetStream
traits for writing to and reading from octet streams,
along with concrete implementations like OutOctetStream
and InOctetStream
.
This library is useful for scenarios requiring custom serialization logic, such as network protocols, file formats, or inter-process communication.
Features
- Custom Octet Stream Traits: Implement
WriteOctetStream
andReadOctetStream
to define your own serialization logic. - Built-in Implementations: Use
OutOctetStream
for writing andInOctetStream
for reading in-memory byte buffers. - Primitive Type Support: Read and write primitive types like u8, i8, u16, i16, u32, i32, u64, and i64.
- Serialization Traits: Implement
Serialize
andDeserialize
for custom data structures.
Installation
Add flood-rs to your Cargo.toml:
[]
= "0.0.7"
Usage
Writing Data to an Octet Stream
use ;
use Result;
Reading Data from an Octet Stream
use ;
use Result;
License
This project is licensed under the MIT License. See the LICENSE file for details.