Documentation ¶
Overview ¶
Package splitter manages splitting of object data into chunks.
Index ¶
Constants ¶
View Source
const DefaultAlgorithm = "DYNAMIC-4M-BUZHASH"
DefaultAlgorithm is the name of the splitter used by default for new repositories.
Variables ¶
This section is empty.
Functions ¶
func SupportedAlgorithms ¶
func SupportedAlgorithms() []string
SupportedAlgorithms returns the list of supported splitters.
Types ¶
type Factory ¶
type Factory func() Splitter
Factory creates instances of Splitter.
func GetFactory ¶
GetFactory gets splitter factory with a specified name or nil if not found.
type Splitter ¶
type Splitter interface { // NextSplitPoint() determines the location of the next split point in the given slice of bytes. // It returns value `n` between 1..len(b) if a split point happens AFTER byte n and the splitter // has consumed `n` bytes. // If there is no split point, the splitter returns -1 and consumes all bytes from the slice. NextSplitPoint(b []byte) int MaxSegmentSize() int Reset() Close() }
Splitter determines when to split a given object.
Click to show internal directories.
Click to hide internal directories.