cbor-js icon indicating copy to clipboard operation
cbor-js copied to clipboard

The Concise Binary Object Representation (CBOR) data format (RFC7049) implemented in pure JavaScript.

Results 16 cbor-js issues
Sort by recently updated
recently updated
newest added

I have a CBOR encoded hex string that I need to decode. I need code to do something like this that happens on cbor.me. I paste this on the right...

The root cause seems to be the string encoder assuming that any character `\ud800` is the first half of a well formed UTF-16 surrogate pair. That assumption fails in the...

I am experimenting with these test data: https://github.com/eu-digital-green-certificates/dgc-testdata/blob/main/IT/2DCode/raw/1.json But I can't get COSE from COMPRESSED, instead I get error: "uncaught exception: Remaining bytes" My code: function vai() { source =...

https://cbor.io/spec.html states that [RFC-8949](https://www.rfc-editor.org/rfc/rfc8949.html) is a new edition of RFC-7049 that describes the _same_ format, but with more explanation of topics that had arisen since the first RFC. It would...

Just to give folks an idea of perf of this lib, I ran a really simple benchmark with a ~200kb object. ![image](https://cloud.githubusercontent.com/assets/39191/12793854/3f3a6c2e-ca67-11e5-93fc-83ddcbe23edf.png) Also I tried a similar test with node-cbor...

When decoding a large string there is a `Maximum call stack size exceeded` error at this line return String.fromCharCode.apply(null, utf16data); That's because there is a limit on the number of...

Codepoints in [U+E000,U+FFFF] were incorrectly handled by the surrogate pair code path. Example of behavior before the fix: ``` duk> CBOR.encode('\ue000') = |64f0908080| duk> CBOR.decode(CBOR.encode('\ue000')) = "\ud800\udc00" duk> CBOR.decode(CBOR.encode('\uffff')) =...

There is a draft RFC to be published soon which adds support for packed/typed arrays in CBOR, see the [current version](https://tools.ietf.org/html/draft-jroatch-cbor-tags-02). As one of the original CBOR authors is also...

Copy the entire byte array instead of iterating over one byte at a time. This makes CBOR much much faster at encoding messages with large binary blobs. Benchmarking on this...

Currently if an attribute in a JSON object being encoded is of type `ArrayBuffer`, it is silently ignored. It would be nice if somewhere around [line 158](https://github.com/paroga/cbor-js/blob/master/cbor.js#L158), `encode` detected that...