Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IntToLetters ¶
IntToLetters is convert number to alpha to chunk sufix. Like aa, ab, ac..
Types ¶
type Option ¶
type Option = func(*Writer)
Option is the type of an option passed to NewWriter.
func Bits ¶
Bits is an option for NewWriter that changes the number of trailing zero bits in the rolling checksum used to identify chunk boundaries. A chunk boundary occurs on average once every 2^n bytes. (But the actual median chunk size is the logarithm, base (2^n-1)/(2^n), of 0.5.) The default value for n is 16, producing a chunk boundary every 65,536 bytes, and a median chunk size of 45,426 bytes.
func Fanout ¶
Fanout is an option for NewWriter that can change the fanout of the nodes in the tree produced. The value of n must be 1 or higher. The default is 8. In a nutshell, nodes in the hashsplit tree will tend to have around 2n children each, because each chunk's "level" is reduced by dividing it by n. For more information see https://pkg.go.dev/github.com/bobg/hashsplit#TreeBuilder.Add.
func MinBytesOfPart ¶
MinBytesOfPart is an option for NewWriter that sets a lower bound on the size of a file part. The default is 1 048 576 byte
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is an io.WriteCloser that splits its input with a hashsplit.Splitter, It additionally assembles those chunks into a tree with a hashsplit.TreeBuilder.