Hi Guys,
using the Bincode library, why is there a size difference when I do the following?
let size = bincode::serialized_size(b"hellobello").unwrap();
// here the size is 10
let size = bincode::serialized_size("hellobello".as_bytes()).unwrap();
// here the size is 18
So with the following bytes - as valid ASCII characters - should take 1 byte per character, that means 10 char * 1 byte => 10 bytes.
But when I use a &[u8] or a "..".as_bytes(), the size is almost double. Why?
Thank you in advance.