You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: transparent conversion between ByteBuf and Vec<u8>
This change makes it possible to decode a serde_bytes::ByteBuf from
CBOR data encoded as a Vec<u8> (and in the other direction, too).
The ByteBuf -> Vec<u8> direction is not optimal because it allocates
an additional buffer, but this should not be a problem because decoding
one byte at a time ruins performance anyway.
Context: our project migrates from serde_cbor to ciborium.
ciborium is faster and generates compact code, but we have old data sets
generated using inefficient Vec<u8> encoding. We want to be able to
decode them with ciborium, which currently does not provide
compatibility between Vec<u8> and ByteBuf as serde_cbor did.
Signed-off-by: Roman Kashitsyn <[email protected]>
0 commit comments