deno_std
deno_std copied to clipboard
suggestion: add CBOR encoding/decoding
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.
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.