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
cbor_serialize returns 0 if data size was insufficient.
It would be useful to also get some report of how many more bytes should be supplied to finish serialization.
Or maybe additional function (something like size_t cbor_calculate(const cbor_item *)) should be added that calculates required data size.
cbor_serialize_alloc provides something similar, but it does it in another way. What I want is to alloc only once, and exactly as many bytes as it is required to store serialized data.
The text was updated successfully, but these errors were encountered:
cbor_serialize
returns 0 if data size was insufficient.It would be useful to also get some report of how many more bytes should be supplied to finish serialization.
Or maybe additional function (something like
size_t cbor_calculate(const cbor_item *)
) should be added that calculates required data size.cbor_serialize_alloc
provides something similar, but it does it in another way. What I want is to alloc only once, and exactly as many bytes as it is required to store serialized data.The text was updated successfully, but these errors were encountered: