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
vector<uint8_t> data;
cbor::cbor_bytes_encoder encoder(data);
encoder.begin_array(1);
encoder.flush();
data.push_back(0xC1); // tag value
encoder.uint64_value(1); // actual data value
encoder.end_array();
encoder.flush();
Decoding (simplified) example:
cbor::cbor_bytes_cursor cursor(data);
cursor.next();
if (*(data.data() + cursor.column() - 2) == 0xC1) {
// expected tag
uint64_t myDataValue = cursor.current().get<uint64_t>();
}
I don't know whether there is a better way to deal with it, for me this seems to be sufficient at the moment.
My workarounds (for simple data) so far ...
Encoding example:
Decoding (simplified) example:
I don't know whether there is a better way to deal with it, for me this seems to be sufficient at the moment.
Originally posted by @Pique7 in #567 (reply in thread)
The text was updated successfully, but these errors were encountered: