Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: CBOR Tag 24 Support - Encoded CBOR data item #261

Open
sargun opened this issue Jan 25, 2021 · 1 comment
Open

feature: CBOR Tag 24 Support - Encoded CBOR data item #261

sargun opened this issue Jan 25, 2021 · 1 comment
Labels
enhancement New feature or request has workaround

Comments

@sargun
Copy link

sargun commented Jan 25, 2021

Is your feature request related to a problem? Please describe.
Encoded CBOR data item nests serialized CBOR within itself as a byte string. This is useful from a performance perspective, as decoding can be deferred to a later stage. In addition, because byte strings are length prefixed, you can seek past entire chunks (say a large map) of CBOR that you don't want to parse / read.

Describe the solution you'd like
Encoded CBOR data item support for encoding and decoding.

Describe alternatives you've considered
I can do this "by hand", by encoding CBOR manually, telling it my item is type 24, and then adding it to my structure

Additional context
See this part of the CBOR spec / RFC: https://tools.ietf.org/html/rfc8949#section-3.4.5.1

@fxamacker fxamacker added enhancement New feature or request has workaround labels May 29, 2021
@fxamacker fxamacker added this to the v2.4.0 milestone May 29, 2021
@fxamacker fxamacker removed this from the v2.4.0 milestone Dec 28, 2021
@fxamacker fxamacker added this to the v2.6.0 milestone Aug 13, 2023
@extemporalgenome
Copy link

What would the implemented behavior be? Decode into any would yield a validated cbor.RawMessage when encountering Tag 24 perhaps?

A Tag 24 CBOR value corresponding to a struct field should probably just eagerly decode anyways, unless the field type was cbor.RawMessage (thus the tag would be ignored unless decoding into any)?

@fxamacker fxamacker modified the milestones: v2.6.0, v2.7.0 Feb 12, 2024
@fxamacker fxamacker removed this from the v2.7.0 milestone Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request has workaround
Projects
None yet
Development

No branches or pull requests

3 participants