core

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(ctx context.Context, r io.Reader, opts ...Opt) (*types.Result, error)

Decode receives byte data in a io.Reader and creates a Result

func Encode

func Encode(ctx context.Context, r io.Reader, opts ...Opt) (*types.Result, error)

Encode receives a bit string in a io.Reader and creates a Result

Types

type Config

type Config struct {
	InMaxBits         int
	InCompressionType compression.CompressionType

	OutMaxBits         int
	OutCompressionType compression.CompressionType

	StatsMaxBlockSize int
	StatsTopK         int
}

func NewDefaultConfig

func NewDefaultConfig() *Config

type Opt

type Opt func(c *Config)

func WithInBitsCap

func WithInBitsCap(maxBits int) Opt

func WithInCompression

func WithInCompression(ct compression.CompressionType) Opt

func WithOutBitsCap

func WithOutBitsCap(maxBits int) Opt

func WithOutCompression

func WithOutCompression(ct compression.CompressionType) Opt

func WithStatsMaxBlockSize added in v1.1.0

func WithStatsMaxBlockSize(maxBlockSize int) Opt

func WithStatsTopK added in v1.1.0

func WithStatsTopK(topK int) Opt

Jump to

Keyboard shortcuts

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