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 was archived by the owner on Apr 29, 2020. It is now read-only.
Builds on #49. A separate PR as it's slightly contentious.
Sets default DAG construction to be a `dag-pb` root node, `dag-pb`
intermediate nodes and `ipld-raw` nodes for leaves. This will make
parsing ever so slightly faster and DAG sizes ever so slightly
smaller as there is no protobuf wrapper for the actual file data.
Currently you may end up with `ipld-raw` leaves or `dag-pb` leaves
that contain UnixFS entries with type 'file' or 'raw' depending on
where the importer is invoked from.
E.g. to generate the same CIDs as go-IPFS, `ipfs.add` will result in
a balanced DAG with UnixFS leaf nodes with a type 'file',
`ipfs.files.write` will result in a trickle DAG with UnixFS leaf
nodes of a type `raw`, and specifying CID version 1 will get you
`ipld-raw` leaf nodes and whatever tree strategy you specifed,
default balanced.
I think this is chaos, we should use `ipld-raw` leaf types everywhere
and only offer options to change the DAG structure, not leaf types.
Copy file name to clipboardExpand all lines: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -141,8 +141,8 @@ The input's file paths and directory structure will be preserved in the [`dag-pb
141
141
-`onlyHash` (boolean, defaults to false): Only chunk and hash - do not write to disk
142
142
-`hashAlg` (string): multihash hashing algorithm to use
143
143
-`cidVersion` (integer, default 0): the CID version to use when storing the data (storage keys are based on the CID, _including_ it's version)
144
-
-`rawLeaves` (boolean, defaults to false): When a file would span multiple DAGNodes, if this is true the leaf nodes will not be wrapped in `UnixFS` protobufs and will instead contain the raw file bytes
145
-
-`leafType` (string, defaults to `'file'`) what type of UnixFS node leaves should be - can be `'file'` or `'raw'` (ignored when `rawLeaves` is `true`)
144
+
-`rawLeaves` (boolean, defaults to true): When a file would span multiple DAGNodes, if this is true the leaf nodes will not be wrapped in `UnixFS` protobufs and will instead contain the raw file bytes
145
+
-`leafType` (string, defaults to `'file'`) what type of UnixFS node leaves should be - can be `'file'` or `'raw'` (ignored when `rawLeaves` is explicitly set to `true`)
146
146
-`blockWriteConcurrency` (positive integer, defaults to 10) How many blocks to hash and write to the block store concurrently. For small numbers of large files this should be high (e.g. 50).
147
147
-`fileImportConcurrency` (number, defaults to 50) How many files to import concurrently. For large numbers of small files this should be high (e.g. 50).
0 commit comments