Canonical CBOR encoding
See original GitHub issueHey! This speed at which this library encodes is just marvelous, awesome project! I noticed however, that this speed comes at the cost of binary size, since for simple “tags” cbor-x doesn’t always choose the shortest possible, e.g.
encode(Buffer.alloc(0)) // returns <Buffer 58 00>
while other implementations return the shorter (and canonical) <Buffer 40>
.
I would love for this to be corrected, cbor-x is just too fast! 😃 But I can totally understand if this is something that’s been done for speed’s sake or would require major effort.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Canonical Event Log Format - Trusted Computing Group
This specification also provides a simple Type-Length-Value (TLV) encoding, a Concise Binary Object Representation (CBOR) encoding, and a JSON ...
Read more >RFC 7049: Concise Binary Object ... - » RFC Editor
If a protocol considers "canonical" to mean that two encoder implementations starting with the same input data will produce the same CBOR output, ......
Read more >The several canons of CBOR - ImperialViolet
There are many encoding formats. CBOR is one of them. Like several others, a subset of it basically fine—I'm not starting that fight...
Read more >CBOR — Concise Binary Object Representation | Overview
“The Concise Binary Object Representation (CBOR) is a data format whose design goals ... In JSON, these data need to be encoded (usually...
Read more >CBOR/PeterO.Cbor.CBOREncodeOptions.md at master - GitHub
Specifies options for encoding and decoding CBOR objects. ... When encoding, are written out using the CTAP2 canonical CBOR encoding form, which is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No, this is super easy, just an oversight. Should be fixed with the commit above. I’ll get a new version published soon.
Woop woop! 🥳🥳