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 has the idea of encoding data items in binary (CBOR) and then embedding them in the object itself. This has some really big benefits around in-place decoding because bstr are length prefixed, and you can skip decoding the entire item versus having to seek through the stream.
The text was updated successfully, but these errors were encountered:
CBOR Tags 24 and 63 are used for this. I think it makes sense to handle this at the application level since the choice of which items to embed should lie with the application developer.
The encoder method encode_to_bytes is designed for this, but could do with documentation and example usage. The equivalent decoder method is decode_from_bytes
tag 24 is used for single items, and 63 is used for an embedded sequence. We have not yet explored how best to handle sequences other than cbor2.tool which can call the decoder iteratively.
I would be interested in further discussion/suggestions/
It'd be nice to be able to have some documentation on how to write an object that would naturally encode into tag 24. Or potentially a base class you could subclass and get encoded as tag 24?
CBOR has the idea of encoding data items in binary (CBOR) and then embedding them in the object itself. This has some really big benefits around in-place decoding because bstr are length prefixed, and you can skip decoding the entire item versus having to seek through the stream.
The text was updated successfully, but these errors were encountered: