bytes icon indicating copy to clipboard operation
bytes copied to clipboard

Utilities for working with bytes

Results 111 bytes issues
Sort by recently updated
recently updated
newest added

This issue could also be a sub-issue of #178. According to the docs of `Buf::chunk`: https://github.com/tokio-rs/bytes/blob/8cc940779fd6a489a2d7ca53fbbc44f84210083e/src/buf/buf_impl.rs#L142-L150 It only requires the implementer to return an empty slice when `Buf::remaining` returns 0,...

This PRs adds optional support for the [arbitrary crate](https://github.com/rust-fuzz/arbitrary/) by deriving the Arbitrary trait for both Bytes and BytesMut. This is incredibly useful for fuzz testing as it allows for...

I have a function that encodes an input `Into where T: Into` and `From` are already implemented so I don't see an issue.

Is the conversion from bytes to Vec O(1) if the underlying memory is already contiguous and the ref count is 1? Or do we still have new allocations and copying?...

The design of `Buf::chunks_vectored()` does not account for an implementation that returns a partial slice in `chunk()` and doesn't override `chunks_vectored()` to be the full thing. It's assumed that if...

A tiny step closer at making #474 and #701 harder to encounter.

In my question to move from `Arc` to `BytesMut`, I am facing a couple of missing methods I had on `Vec`. One of them is `splice` (https://doc.rust-lang.org/std/vec/struct.Vec.html#method.splice). I am guessing...

In #703, we disabled a new lint because it fails when it encounters `#[cfg(loom)]`. It would be nice to do something similar to https://github.com/tokio-rs/tokio/pull/6538 to run the lint in CI.

I'm using `BytesMut::unsplit` in a project and would like to raise an error when the bytes cannot be unsplitted, instead of silently copying. An `Err(_)` would let me know I...

`bytes` has become a little bit of a de facto standard for low/zero-copy techniques, with authors of some popular crates being comfortable with exposing `bytes` types in their interfaces. In...