You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
Is the raw codec documented anywhere? I want to link to it from a spec document but there doesn't seem to be anything in the block-layer/codecs directory.
I guess it could be as simple as "It's an opaque stream of bytes".
The text was updated successfully, but these errors were encountered:
Here's a question for the spec. Are zero bytes valid in the "raw" codec? Nearly all other codecs should reject empty input on decode, I think. Take JSON and CBOR including their "DAG" variants, for example - a value/node in either can't be encoded as zero bytes.
I think the "raw" codec is special enough that it might be OK for it to be zero bytes. But also, it probably makes no sense for an IPLD block to have zero length.
dag-pb has a special case for zero bytes, it's a form we have to recognise, so there's an existing case for it. I would say that it's valid for raw to have zero bytes since a zero length byte array is a perfectly reasonable programmatic construct. The difference with dag-cbor and dag-json is that there's no clear connection between a zero length block and what the data model should be representing for it, since both of those require something even for "empty" recursives and bytes.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is the
raw
codec documented anywhere? I want to link to it from a spec document but there doesn't seem to be anything in theblock-layer/codecs
directory.I guess it could be as simple as "It's an opaque stream of bytes".
The text was updated successfully, but these errors were encountered: