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

suggestion: add CBOR encoding/decoding #5479

Open
benatkin opened this issue Jul 18, 2024 · 2 comments · May be fixed by #5909
Open

suggestion: add CBOR encoding/decoding #5479

benatkin opened this issue Jul 18, 2024 · 2 comments · May be fixed by #5909
Labels
feedback welcome We want community's feedback on this issue or PR suggestion a suggestion yet to be agreed

Comments

@benatkin
Copy link

Deno's stdlib has msgpack support. msgpack and CBOR each have pros and cons compared to each other, but this limitation is what gives me the desire to have CBOR:

maximum byte size of a String object is (2^32)-1

A CBOR implementation alongside msgpack here.

Describe alternatives you've considered

There are third party libraries, but this is something I'd like to see in the standard library.

Another nice thing about CBOR is its support for indefinite length items which is good for streaming.

@iuioiua iuioiua changed the title CBOR suggestion: add CBOR encoding/decoding Jul 18, 2024
@iuioiua iuioiua added suggestion a suggestion yet to be agreed feedback welcome We want community's feedback on this issue or PR labels Jul 18, 2024
@BlackAsLight
Copy link
Contributor

For the record, CBOR is still streamable with definite length items. Indefinite length items are for streaming content when you don't know the size before starting. Like applying compression algorithm to some data or converting a file format from one type to another.

@benatkin
Copy link
Author

benatkin commented Jul 25, 2024

Streaming implementations already in @std:

Also looked at the state of DOMParser:

@BlackAsLight BlackAsLight linked a pull request Sep 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback welcome We want community's feedback on this issue or PR suggestion a suggestion yet to be agreed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants