-
Notifications
You must be signed in to change notification settings - Fork 602
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
feat(cbor/unstable): Introduce @std/cbor
#5909
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5909 +/- ##
==========================================
- Coverage 96.28% 95.49% -0.80%
==========================================
Files 496 502 +6
Lines 39605 40717 +1112
Branches 5841 6027 +186
==========================================
+ Hits 38134 38881 +747
- Misses 1429 1793 +364
- Partials 42 43 +1 ☔ View full report in Codecov by Sentry. |
I wonder if these need to be classes when they both don't have any instance states. How about making them just |
Sure. I was trying to mirror the structure of |
Side note: |
@BlackAsLight, could you please draft this PR and un-draft once ready for us to review? |
Closes #5479
This pull request introduces a CBOR implementation based off the RFC 8949 spec from scratch. At the moment it only introduces
encodeCbor
/decodeCbor
functions (which operate in a sync manner and therefore is limited to JavaScript's limitations on memory usage around variable sizes) and Byte, Text, Array, Map, and Sequence Encoder Streams for larger amounts of data or if wanting to work with indefinite length types. The decoding stream methods are yet to be committed to this pull request.Example