Replies: 2 comments 1 reply
-
There is an overview of the sizes here: https://json.nlohmann.me/features/binary_formats/ |
Beta Was this translation helpful? Give feedback.
-
You even got that covered, excellent! From that table I see that CBOR and MessagePack are the clear winners. And from what I could tell this is no wonder since CBOR is derived from MessagePack. Are there any nuances that might push the choice to one over the other? Apart from occasionally storing byte arrays I am not using anything exotic, so it is just the JSON types. So I suppose the deserialisation incompleteness of CBOR presented in the overview is irrelevant in my case. |
Beta Was this translation helpful? Give feedback.
-
Greetings!
In my project when a file is saved it may contain thousands, tens of thousands and possibly even much more items, each having some metadata. With that in mind I have decided that reducing the file size is the top priority. Which of the supported binary formats is the best one for the job?
I also think that I might need to store byte arrays (binary types? binary data? Not sure what exact terminology to use here, I mean the data stored as
std::vector<std::uint8_t>
by default in memory by this library) for data that I might need to encode/decode myself, so as far as I understand, according to documentation that reduces the choice to BSON, CBOR and MessagePack.Beta Was this translation helpful? Give feedback.
All reactions