ipld-eth-server/vendor/github.com/ipfs/go-ipfs-chunker
2019-12-02 13:24:49 -06:00
..
.travis.yml update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00
go.mod update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00
go.sum update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00
LICENSE update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00
Makefile update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00
package.json update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00
parse.go update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00
rabin.go update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00
README.md update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00
splitting.go update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00

go-ipfs-chunker

standard-readme compliant GoDoc Build Status

go-ipfs-chunker implements data Splitters for go-ipfs.

go-ipfs-chunker provides the Splitter interface. IPFS splitters read data from a reader an create "chunks". These chunks are used to build the ipfs DAGs (Merkle Tree) and are the base unit to obtain the sums that ipfs uses to address content.

The package provides a SizeSplitter which creates chunks of equal size and it is used by default in most cases, and a rabin fingerprint chunker. This chunker will attempt to split data in a way that the resulting blocks are the same when the data has repetitive patterns, thus optimizing the resulting DAGs.

Table of Contents

Install

go-ipfs-chunker works like a regular Go module:

> go get github.com/ipfs/go-ipfs-chunker

It uses Gx to manage dependencies. You can use make all to build it with the gx dependencies.

Usage

import "github.com/ipfs/go-ipfs-chunker"

Check the GoDoc documentation

Contribute

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © Protocol Labs, Inc.