Add buzhash to `ipfs add` docs
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
Jakub Sztandera committed
Oct 7, 2019 at 19:57 UTC
76d2ad404ddb129cf15af79c494d81a6086e6f93
1 file changed
+5
-5
core/commands/add.go
+5
-5
@@ -11,7 +11,7 @@ import (
11
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
12
13
cmds "github.com/ipfs/go-ipfs-cmds"
14
- "github.com/ipfs/go-ipfs-files"
14
+ files "github.com/ipfs/go-ipfs-files"
15
coreiface "github.com/ipfs/interface-go-ipfs-core"
16
"github.com/ipfs/interface-go-ipfs-core/options"
17
mh "github.com/multiformats/go-multihash"
@@ -80,9 +80,9 @@ how to break files into blocks. Blocks with same content can
80
be deduplicated. Different chunking strategies will produce different
81
hashes for the same file. The default is a fixed block size of
82
256 * 1024 bytes, 'size-262144'. Alternatively, you can use the
83
-Rabin fingerprint chunker for content defined chunking by specifying
84
-rabin-[min]-[avg]-[max] (where min/avg/max refer to the desired
85
-chunk sizes in bytes), e.g. 'rabin-262144-524288-1048576'.
83
+Buzhash or Rabin fingerprint chunker for content defined chunking by
84
+specifying buzhash or rabin-[min]-[avg]-[max] (where min/avg/max refer
85
+to the desired chunk sizes in bytes), e.g. 'rabin-262144-524288-1048576'.
86
87
The following examples use very small byte sizes to demonstrate the
88
properties of the different chunkers on a small file. You'll likely
@@ -120,7 +120,7 @@ You can now check what blocks have been created by:
120
cmds.BoolOption(trickleOptionName, "t", "Use trickle-dag format for dag generation."),
121
cmds.BoolOption(onlyHashOptionName, "n", "Only chunk and hash - do not write to disk."),
122
cmds.BoolOption(wrapOptionName, "w", "Wrap files with a directory object."),
123
- cmds.StringOption(chunkerOptionName, "s", "Chunking algorithm, size-[bytes] or rabin-[min]-[avg]-[max]").WithDefault("size-262144"),
123
+ cmds.StringOption(chunkerOptionName, "s", "Chunking algorithm, size-[bytes], rabin-[min]-[avg]-[max] or buzhash").WithDefault("size-262144"),
124
cmds.BoolOption(pinOptionName, "Pin this object when adding.").WithDefault(true),
125
cmds.BoolOption(rawLeavesOptionName, "Use raw blocks for leaf nodes. (experimental)"),
126
cmds.BoolOption(noCopyOptionName, "Add the file using filestore. Implies raw-leaves. (experimental)"),