MCPcopy Create free account
hub / github.com/bobg/hashsplit / NewSplitter

Function NewSplitter

hashsplit.go:81–87  ·  view source on GitHub ↗

NewSplitter produces a new Splitter. It may be customized before use by setting its MinSize and SplitBits fields.

()

Source from the content-addressed store, hash-verified

79// NewSplitter produces a new Splitter.
80// It may be customized before use by setting its MinSize and SplitBits fields.
81func NewSplitter() *Splitter {
82 rs := buzhash32.New()
83 var zeroes [windowSize]byte
84 _, _ = rs.Write(zeroes[:]) // initialize the rolling checksum window
85
86 return &Splitter{rs: rs}
87}
88
89// Split consumes the given input stream and hashsplits it, producing an iterator of chunk/level pairs.
90//

Callers 1

SplitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected