Skip to content

Commit d9073a4

Browse files
committed
unixfs: suggest, but do not strictly mandate unixfs<>dagpb
The strict coupling poses some problems for IPLD implementations that: 1. do not retain codec information between the serialization and UnixFS (ADL) reification; and/or 2. do not have a mechanism to strictly mandate that UnixFS data be _only_ encoded in a particular codec. A mandate in the specification that strictly defines the layering on top of the codec makes it difficult to implement it as an ADL, which also presents difficulty for using tooling that builds on IPLD lens-style layering. Ref: ipfs/go-unixfsnode#27 Ref: #271 Ref: ipld/go-car#304
1 parent 36c909a commit d9073a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UNIXFS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ This `Data` object is used for all non-leaf nodes in Unixfs.
7878

7979
For files that are comprised of more than a single block, the 'Type' field will be set to 'File', the 'filesize' field will be set to the total number of bytes in the file (not the graph structure) represented by this node, and 'blocksizes' will contain a list of the filesizes of each child node.
8080

81-
This data is serialized and placed inside the 'Data' field of the outer merkledag protobuf, which also contains the actual links to the child nodes of this object.
81+
This data is serialized and placed inside the 'Data' _Bytes_ node of the containing IPLD block, which also contains the actual links to the child nodes of this object in a 'Links' _List_ node. Typically this is encoded using the [DAG-PB](https://ipld.io/specs/codecs/dag-pb/spec/) codec. An implementations of this UnixFS specification may opt to strictly link DAG-PB to UnixFS for encoding and/or decoding as this is the originally intended layering of this format. For this reason, producers of UnixFS data that do not use DAG-PB as its codec should not expect other implementations of UnixFS to be able to interpret the data.
8282

8383
For files comprised of a single block, the 'Type' field will be set to 'File', 'filesize' will be set to the total number of bytes in the file and the file data will be stored in the 'Data' field.
8484

0 commit comments

Comments
 (0)