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

Talk about packed / tags #91

Open
chrysn opened this issue Nov 22, 2024 · 2 comments
Open

Talk about packed / tags #91

chrysn opened this issue Nov 22, 2024 · 2 comments
Assignees

Comments

@chrysn
Copy link
Member

chrysn commented Nov 22, 2024

In early phases of CRIs we talked about potential optimizations for particular URI patterns, eg. coap+sms://001555112358132134 into a more binary friendly format, https://base32stuff.onion/foo/bar as actual binary data or encoding LwM2M's paths like /1/2/3/3/1/5. We postponed that until the final stages, which we are now in.

At very least we probably want to say something about that CBOR packed is expected to be used in combination with CRIs.

I'm unsure on whether there will be many cases where there would be tags inside a CRI, especially because tags and packed don't do so well expanding to multiple items (although … could a packed table entry contain a CBOR sequence, and multiple items would expand like a CDDL group in an array? Wreaks havoc with parsers that use array length to decide content, but that's not how CDDL works).

Examples:

  • http://base32ofbinarystuff.onion/foo/bar -> 12345(['binarystuff', [true, ["foo", "bar"]]]), with a tag expanding the binary stuff to a base URI and then having a 2nd item that is a CRI reference relative to it, or 12345(['binarystuff', ["foo", "bar"]]) whose CDDL would reach deeper into the CRI reference syntax
  • coap://[2001:db8::1]/1/1/2/3 -> [0, ip'2001:db8::1', 64(h'01010203')] reusing an allocated tag because it does just the right thing, at least when pulled into a stand-in for array-of-strings?
@chrysn
Copy link
Member Author

chrysn commented Jan 24, 2025

I think that the choice of whether any particular use of a CRI. Unless agreed on differently, packing and tags should not be expected to be supported (but maybe someone still tries if they have a way of recovery).

@chrysn
Copy link
Member Author

chrysn commented Jan 24, 2025

Another example of a tag we'll want to use are tags 21..23 ("expected conversation to base…").

These examples seem to encourage using the stand-in concept is helpful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants