Skip to content

monoio-rs/monoio-codec

Monoio-codec

Crates.io MIT/Apache-2 licensed

This crate provides 2 utils:

  1. Framed, FramedRead and FramedWrite: Like the same things in tokio-util, but with monoio pure async AsyncReadRent, AsyncWriteRent, Sink and Stream.
  2. AsyncEncoder, AsyncDecoder: Trait for encode and decode in async streaming way.

If the target codec is designed such that all required data lengths can be read from the header at low cost, using synchronous codec can lead to better performance. If not, you can use our async codec trait.

Note: These 2 modes can be used at the same time because our Framed is also a BufIo. It implements AsyncReadRent and AsyncWriteRent. If users know how much data to read, read directly from it can avoid data copy or buffer growth.

About

No description, website, or topics provided.

Resources

License

Apache-2.0 and 2 other licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Unknown
LICENSE-THIRD-PARTY

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages