Versions in this module Expand all Collapse all v0 v0.4.0 May 26, 2023 Changes in this version + const ChunkSizeLimit + const DefaultBlockSize + const DefaultReedSolomonDataShards + const DefaultReedSolomonParityShards + const DefaultReedSolomonShardSize + const PrefixForDefault + const PrefixForRabin + const PrefixForReedSolomon + const PrefixForSize + var ErrRabinMin = errors.New("rabin min must be greater than 16") + var ErrSize = errors.New("chunker size must be greater than 0") + var ErrSizeMax = fmt.Errorf("chunker parameters may not exceed the maximum chunk size of %d", ...) + var IpfsRabinPoly = chunker.Pol(17437180132763653) + func Chan(s Splitter) (<-chan []byte, <-chan error) + func IsReedSolomon(chunker string) bool + func NewReedSolomonSplitter(r io.Reader, numData, numParity, size uint64) (*reedSolomonSplitter, error) + type Buzhash struct + func NewBuzhash(r io.Reader) *Buzhash + func (b *Buzhash) ChunkSize() uint64 + func (b *Buzhash) MetaData() interface{} + func (b *Buzhash) NextBytes() ([]byte, error) + func (b *Buzhash) Reader() io.Reader + func (b *Buzhash) SetIsDir(v bool) + type MetaSplitter struct + func (ms *MetaSplitter) ChunkSize() uint64 + func (ms *MetaSplitter) MetaData() interface{} + func (ms *MetaSplitter) NextBytes() ([]byte, error) + func (ms *MetaSplitter) Reader() io.Reader + func (rss *MetaSplitter) SetIsDir(v bool) + type MultiSplitter interface + Splitters func() []Splitter + type Rabin struct + func NewRabin(r io.Reader, avgBlkSize uint64) *Rabin + func NewRabinMinMax(r io.Reader, min, avg, max uint64) *Rabin + func (r *Rabin) ChunkSize() uint64 + func (r *Rabin) MetaData() interface{} + func (r *Rabin) NextBytes() ([]byte, error) + func (r *Rabin) Reader() io.Reader + func (rss *Rabin) SetIsDir(v bool) + type RsMetaMap struct + FileSize uint64 + IsDir bool + NumData uint64 + NumParity uint64 + func GetRsMetaMapFromString(str string) (*RsMetaMap, error) + type Splitter interface + ChunkSize func() uint64 + MetaData func() interface{} + NextBytes func() ([]byte, error) + Reader func() io.Reader + SetIsDir func(bool) + func DefaultSplitter(r io.Reader) Splitter + func FromString(r io.Reader, chunker string) (Splitter, error) + func NewMetaSplitter(r io.Reader, size uint64) Splitter + func NewSizeSplitter(r io.Reader, size int64) Splitter + type SplitterGen func(r io.Reader) Splitter + func MetaSplitterGen(size int64) SplitterGen + func SizeSplitterGen(size int64) SplitterGen