digitalbazaar / cborld

A Javascript CBOR-LD processor for web browsers and Node.js apps.
https://json-ld.github.io/cbor-ld-spec/
BSD 3-Clause "New" or "Revised" License
16 stars 12 forks source link

Encoded byte array prefix does not match the specification #59

Closed filip26 closed 2 years ago

filip26 commented 2 years ago

Hi, the first three bytes generated by the library are 0xd90501 for compressed output, but the specification defines 0xd95001 see Compressed CBOR-LD Buffer Algorithm

dlongley commented 2 years ago

Relevant source line: https://github.com/digitalbazaar/cborld/blob/main/lib/encode.js#L38-L40

Which is correct ... the spec or the source?

dlongley commented 2 years ago

Other documentation shared with the JSON-LD WG refers to uncompressed CBOR-LD as using tag 1280 (0x0500):

https://lists.w3.org/Archives/Public/public-json-ld-wg/2020Jul/att-0004/Introduction_to_CBOR-LD.pdf

It could be that the spec text should be changed.

dlongley commented 2 years ago

https://github.com/digitalbazaar/cbor-ld-spec/pull/13 will fix the spec.

dlongley commented 2 years ago

This was fixed in the spec. Thanks!