Open cdata opened 2 years ago
Sounds good, but: decode to what? What's the supposedly universal representation that decoders are expected to produce?
Yah, good point: we don't need to force everything to converge on a One True Format.
For any given content type, there can be many decoders. The most important thing is that at least one of them produces a content type that is legible to the client.
In the early days, we can support decoders that produce Subtext blocks as an output. In time, Subconscious will support native rendering for structured data formats like JSON and media formats like images - decoders that produce these outputs may also be leveraged.
There will probably be some well-known default decoders for various common type->type conversions. And, the content can suggest specific ones in its headers.
In time Noosphere will gain support for arbitrary content types. One way we imagine achieving this is through support of arbitrary content-defined decoders for the body layout of a Memo.
The idea would look something like this:
Decoder
header whose value is a CIDDecoder
CIDIt's likely that Autocodecs would be well-suited for this use case: https://www.youtube.com/watch?v=nCYj0LghbpI