opts

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StubWorkerPool = &stubWorkerPool{}

Functions

This section is empty.

Types

type BlockIdxT

type BlockIdxT = descriptor.BlockIdxT

type DictCallbackT

type DictCallbackT func(id uint32) ([]byte, error)

Emits 'id' embedded in header. Callback may return optional dictionary.

type OptsT

type OptsT struct {
	NParallel       int
	PendingSz       int
	Level           compress.LevelT
	ContentSz       *uint64
	ReadOffset      int64
	BlockChecksum   bool
	BlockLinked     bool
	ContentChecksum bool
	SkipContentSz   bool
	Dictionary      []byte
	DictionaryId    *uint32
	DictCallback    DictCallbackT
	BlockSizeIdx    BlockIdxT
	Handler         ProgressFuncT
	WorkerPool      WorkerPool
	SkipCallback    SkipCallbackT
}

func (OptsT) CalcPending

func (o OptsT) CalcPending() int

func (OptsT) NewCompressorFactory

func (o OptsT) NewCompressorFactory() compress.CompressorFactory

type ProgressFuncT

type ProgressFuncT func(srcOffset, dstPos int64)

Emits offset in bytes from beginning of stream of src and corresponding block.

type SkipCallbackT

type SkipCallbackT func(rdr io.Reader, nibble uint8, sz uint32) (int, error)

The 'nibble' parameter contains the user defined low nibble in the skip frame magic prefix.

Callback must return number of bytes read.

type WorkerPool

type WorkerPool interface {
	Submit(task func())
}

Jump to

Keyboard shortcuts

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