chunk

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT-0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	ID       int
	Data     []byte
	Checksum string
}

Chunk represents a single chunk of data.

type Chunker

type Chunker struct {
	Size int
}

Chunker is responsible for splitting data into resume-able chunks.

func New

func New(size int) *Chunker

func (*Chunker) Reassemble

func (c *Chunker) Reassemble(chunks []Chunk) ([]byte, error)

Reassemble combines chunks back into original data.

func (*Chunker) Split

func (c *Chunker) Split(data []byte) []Chunk

Split splits data into chunks.

Jump to

Keyboard shortcuts

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