shorter chunker stragety and fixed size example with fewer nodes
License: MIT Signed-off-by: Enrique Erne <enrique.erne@gmail.com>
Enrique Erne committed
Oct 28, 2017 at 21:06 UTC
6a9682bb000f6af19548ab8e838545d8f43e6862
1 file changed
+13
-14
core/commands/add.go
+13
-14
@@ -72,29 +72,28 @@ 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
76
-ipfs puts larger files into blocks. Blocks with same content can
75
+The chunker option, '-s', specifies the chunking strategy that dictates
76
+how to break 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'. 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
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
86
- > ipfs add --chunker=rabin-128-256-2048 ipfs-logo.svg
87
- added QmQN64Mbj1WK8wAej5MoFkHkD3aTtSGzGnAFXomdVHNNhs ipfs-logo.svg
84
+ > ipfs add --chunker=size-2048 ipfs-logo.svg
85
+ added QmafrLBfzRLV4XSH1XcaMMeaXEUhDJjmtDfsYU95TrWG87 ipfs-logo.svg
86
+ > ipfs add --chunker=rabin-512-1024-2048 ipfs-logo.svg
87
+ added Qmf1hDN65tR55Ubh2RN1FPxr69xq3giVBz1KApsresY8Gn ipfs-logo.svg
88
89
You can now check what blocks have been created by:
90
91
- > ipfs object links QmQN64Mbj1WK8wAej5MoFkHkD3aTtSGzGnAFXomdVHNNhs
92
- Qmb3Wzsmy9RXkyQhERdPd93mBP2jTRUjgVBwx5yWJR5b6k 223
93
- Qmc7ikMLM1SS88YxxogRtjAyuLLfR85ZDKjfy7ahZYD38h 141
94
- QmeUiJHEXZnEwjpCfUUSkDuXFk2nuT6gALCeUXtZkRvcbj 858
95
- QmWwiQMNhpjq9kFUiuFbSQoqrQNTVjwo1wgbbx8wPr9PjB 1040
96
- QmNPg3SUphwfoJwveDyMRjDDaoitTCE7g9UUqYod8gPwz5 431
97
- QmPzBVWJtMPdeaoJK55rua7LgbEsjHseMHsUSUrPJ3AncS 278
91
+ > ipfs object links QmafrLBfzRLV4XSH1XcaMMeaXEUhDJjmtDfsYU95TrWG87
92
+ QmY6yj1GsermExDXoosVE3aSPxdMNYr6aKuw3nA8LoWPRS 2059
93
+ Qmf7ZQeSxq2fJVJbCmgTrLLVN9tDR9Wy5k75DxQKuz5Gyt 1195
94
+ > ipfs object links Qmf1hDN65tR55Ubh2RN1FPxr69xq3giVBz1KApsresY8Gn
95
+ QmY6yj1GsermExDXoosVE3aSPxdMNYr6aKuw3nA8LoWPRS 2059
96
+ QmerURi9k4XzKCaaPbsK6BL5pMEjF7PGphjDvkkjDtsVf3 868
97
QmQB28iwSriSUSMqG2nXDTLtdPHgWb4rebBrU7Q1j4vxPv 338
98
`,
99
},