Results 46 comments of Trangar

If you don't want to use the varint encoding, you can use either `config::legacy()` (compatible with bincode 1), or `config::standard().with_fixed_int_encoding()`. If you want to control this on a case-by-case basis,...

It sounds like a niche optimization that we probably won't support in bincode. We can't make breaking changes in the data format by changing how `u16` gets (de)serialized, and I...

We can leave this issue open as a tracking issue to see if other developers are interested for a new integer encoding

You can implement a custom `Encode` and `Decode` and do all the optimizations your use case needs

I said "custom `Encode` and `Decode`", not the automatic one. See the following documentation for more info: - Encode: https://docs.rs/bincode/2.0.0-rc.1/bincode/enc/trait.Encode.html#implementing-this-trait-manually - Decode: https://docs.rs/bincode/2.0.0-rc.1/bincode/de/trait.Decode.html#implementing-this-trait-manually

No, see the readme for more information: https://github.com/bincode-org/bincode#why-does-bincode-not-respect-repru8

We haven't implemented `serialized_size` because we're not sure it has a valid use case. Most of the time when people use `serialized_size` it is because they want to use it...

Would it be possible to: - let bincode allocate a `Vec` - call [into_raw_parts](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts) - return that to C - ffi back into Rust to deallocate this vec when you're...

I'll leave this open as a tracking issue to see if other people are interested in having a method to get the encoded `len` in bincode 2.

I'm assuming you mean `EncodeError`. This enum uses the following types that do not implement `Clone`: - [core::cell::BorrowError](https://doc.rust-lang.org/stable/core/cell/struct.BorrowError.html) - [std::io::Error](https://doc.rust-lang.org/stable/std/io/struct.Error.html) We could implement `Clone` on `DecodeError` but I think it...