improves description about the rabin chunker
License: MIT Signed-off-by: Enrique Erne <enrique.erne@gmail.com>
Enrique Erne committed
Oct 28, 2017 at 09:34 UTC
31840fa035b83d9b4218e4fe8a7c4695028f0a40
1 file changed
+12
-11
core/commands/add.go
+12
-11
@@ -72,13 +72,14 @@ You can now refer to the added file in a gateway, like so:
72
73
/ipfs/QmaG4FuMqEBnQNn3C8XJ5bpW8kLs7zq2ZXgHptJHbKDDVx/example.jpg
74
75
-The chunker option, '-s', defines the chunking strategy for how
75
+The chunker option, '-s', defines the chunking strategy for how
76
ipfs puts larger files into blocks. Blocks with same content can
77
be deduplicated. The default is a fixed block size of
78
-256 * 1024 bytes, 'size-262144'. A variable block size can be
79
-specified by using the rabin chunker, rabin-[min]-[avg]-[max].
80
-Using different chunking strategies will produce different hashes
81
-for the same file.
78
+256 * 1024 bytes, 'size-262144'. Alternatively, you can use the
79
+rabin chunker for content defined chunking by specifying
80
+rabin-[min]-[avg]-[max] (where min/avg/max refer to the resulting
81
+chunk sizes). Using other chunking strategies will produce
82
+different hashes for the same file.
83
84
> ipfs add --chunker=size-1024 ipfs-logo.svg
85
added QmZ9KNxxeeLCPrdceBjvVcmSyLbUWMF4ceKDP8yboLNoHT ipfs-logo.svg
@@ -88,12 +89,12 @@ for the same file.
89
You can now check what blocks have been created by:
90
91
> ipfs object links QmQN64Mbj1WK8wAej5MoFkHkD3aTtSGzGnAFXomdVHNNhs
91
- Qmb3Wzsmy9RXkyQhERdPd93mBP2jTRUjgVBwx5yWJR5b6k 223
92
- Qmc7ikMLM1SS88YxxogRtjAyuLLfR85ZDKjfy7ahZYD38h 141
93
- QmeUiJHEXZnEwjpCfUUSkDuXFk2nuT6gALCeUXtZkRvcbj 858
94
- QmWwiQMNhpjq9kFUiuFbSQoqrQNTVjwo1wgbbx8wPr9PjB 1040
95
- QmNPg3SUphwfoJwveDyMRjDDaoitTCE7g9UUqYod8gPwz5 431
96
- QmPzBVWJtMPdeaoJK55rua7LgbEsjHseMHsUSUrPJ3AncS 278
92
+ Qmb3Wzsmy9RXkyQhERdPd93mBP2jTRUjgVBwx5yWJR5b6k 223
93
+ Qmc7ikMLM1SS88YxxogRtjAyuLLfR85ZDKjfy7ahZYD38h 141
94
+ QmeUiJHEXZnEwjpCfUUSkDuXFk2nuT6gALCeUXtZkRvcbj 858
95
+ QmWwiQMNhpjq9kFUiuFbSQoqrQNTVjwo1wgbbx8wPr9PjB 1040
96
+ QmNPg3SUphwfoJwveDyMRjDDaoitTCE7g9UUqYod8gPwz5 431
97
+ QmPzBVWJtMPdeaoJK55rua7LgbEsjHseMHsUSUrPJ3AncS 278
98
QmQB28iwSriSUSMqG2nXDTLtdPHgWb4rebBrU7Q1j4vxPv 338
99
`,
100
},