Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Bincode v2, serde functions do not match naming and arguments of bincode functions #654

@spaolacci

Description

@spaolacci

Hi,

On top of being more symmetrical with decode_from_slice, this is very handy for cases where that information is not easily available decoding side.

Use case that I'm having is where the slice host a collection of bincode-encoded items. The overall size is know (through a specific header) but not individual item encoded sizes. A representative example could be a list of &str.

That’s obviously fixable through a per item extra usize header but make encoding/decoding slower, and serialized size larger, than need to be.

I might have missed something but it seem decoder's reader is having that information which could gain from being exposed (as for
decode_from_slice).

And thanks a lot for the very nice crate!

Seb

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions