bytes
bytes copied to clipboard
Utilities for working with bytes
Thank you for providing this crate. The API is really intuitive, however, for some projects there is a feature I am missing: support for native endianness. Right now `Buf` and...
I would like to be able to tell if a `Bytes` object is the unique reference to the underlying data. The usecase is a cache, where I want to be...
This is based largely on the example of `BytesMut::unsplit`. If two `Bytes` are contiguous and point to the same allocation, then they are cheaply merged. Otherwise, a new `BytesMut` is...
currently the methods that read data from the underlying buffer panic if no more data can be read. this behavior is kind of annoying because it feels awkward to manually...
Just want to use it to use shared memory, but it `pub(crate) unsafe fn with_vtable` and `pub(crate) struct Vtable`, Hope to change to remote `(crate)`
Heyo there, when writing `serde_json::to_writer` on `BytesMut` vs. writing `serde_json::to_vec` I saw a slowdown of roughly 40% depending on input size – while I expected them to perform equally fast....
It would be nice to have a test suite that test an implementation of `Buf` and `BufMut`. It's would avoid everybody to write they own test, also, I expect bytes...
This changes the internal BytesMut representation to allocate memory on its own, and not to use Arc + Vec under the hood. Doing this allows to have a single representation...
If `self.kind() == KIND_VEC` is true, `freeze` ends up calling `vec.into()` which appears to not be zero-cost at all, and ends up doing a huge memcpy somewhere in the bowels...
**Proposition:** I wonder if is it possible to make `alloc` optional. As far as I have checked the source code the main problem for make alloc optional is with implementation...