... It's small. The crypto standard allows data in the doc and what is referenced to be signed.
... Compressing with CBOR-LD creates a substantially smaller document than the equivalent JSON-LD.
... This constructs an "invertable map" from JSON-LD terms to CBOR-LD terms.
... URLs can be compressed by adding them into the context itself.
... Issuer-specific contexts allow this to be expressed minimally.
... Contexts are processed in a specific way so that it can be verified.
... Verifier reconstructs without using the original map.
... Example 23 shows a map created by processing the contexts into integers.
... Much of the core JSON-LD terms are hardcoded into CBOR-LD (e.g., '@context').
... A Type Table is used to namespace tables to get a range of integers to which it compresses.
... Based on identifying a specific type, I can use that custom mapping for that type.
... You process context documents and compress based on that.
... Specific context IRIs map to well-known integers.
... The mapping must be reconstructable when verifying.
... But, this creates an issue to invert those numbers to find the associated context documents.
... CBOR has tags, which allow semantic information to be associated with CBOR objects.
... We're reserving a tag range for CBOR-LD tags.
... When I see such a value, I can look it up from a spec.
... We use CBOR tag value to find the value for a tag from a registry.
Benjamin Young: Are CBOR-LD processors expected to keep a copy of the registry? ✪
Wesley Smith: Yes, they idea is to keep these as stable as possible. ✪
... The key point is to invert the context string expression.
... I have to invert part of the encoding to find more things to be deoded.
Benjamin Young: The mapping is not looked up, but constructed based on the data. It only includes common mappings, and those that are needed for the specific document. ✪
Wesley Smith: Not everything in the contexts are added to the map. ✪