chunk

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = Params{
	MinSize: 16 * 1024,
	AvgSize: 64 * 1024,
	MaxSize: 256 * 1024,
	Window:  64,
}

Functions

This section is empty.

Types

type Buzhash

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

func NewBuzhash

func NewBuzhash(window int) *Buzhash

func (*Buzhash) Ready

func (b *Buzhash) Ready() bool

func (*Buzhash) Roll

func (b *Buzhash) Roll(next byte)

func (*Buzhash) Sum64

func (b *Buzhash) Sum64() uint64

type Chunk

type Chunk struct {
	Offset int64
	Length uint32
	Hash   [32]byte
	Data   []byte
}

func Split

func Split(data []byte, p Params) ([]Chunk, error)

type Params

type Params struct {
	MinSize int
	AvgSize int
	MaxSize int
	Window  int
}

func (Params) Validate

func (p Params) Validate() error

Jump to

Keyboard shortcuts

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