chunk

package
v0.4.9-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

package chunk implements streaming block splitters

Index

Constants

This section is empty.

Variables

View Source
var DefaultBlockSize int64 = 1024 * 256
View Source
var IpfsRabinPoly = chunker.Pol(17437180132763653)

Functions

func Chan added in v0.3.8

func Chan(s Splitter) (<-chan []byte, <-chan error)

Types

type Rabin added in v0.3.8

type Rabin struct {
	// contains filtered or unexported fields
}

func NewRabin added in v0.3.8

func NewRabin(r io.Reader, avgBlkSize uint64) *Rabin

func NewRabinMinMax added in v0.3.8

func NewRabinMinMax(r io.Reader, min, avg, max uint64) *Rabin

func (*Rabin) NextBytes added in v0.3.8

func (r *Rabin) NextBytes() ([]byte, error)

func (*Rabin) Reader added in v0.4.5

func (r *Rabin) Reader() io.Reader

type Splitter added in v0.3.8

type Splitter interface {
	Reader() io.Reader
	NextBytes() ([]byte, error)
}

func DefaultSplitter

func DefaultSplitter(r io.Reader) Splitter

func FromString added in v0.3.8

func FromString(r io.Reader, chunker string) (Splitter, error)

func NewSizeSplitter added in v0.3.8

func NewSizeSplitter(r io.Reader, size int64) Splitter

type SplitterGen added in v0.3.8

type SplitterGen func(r io.Reader) Splitter

func SizeSplitterGen added in v0.3.8

func SizeSplitterGen(size int64) SplitterGen

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL