compress

package module
v0.0.0-...-de84184 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Algorithms = []Algorithm{DEFLATE, GZIP, ZLIB, LZW, BZIP2, LZ4, BROTLI, SNAPPY, ZSTD, LZMA}

	ErrUnknown     = errors.New("compression-bench: unknown algorithm")
	ErrUnavailable = errors.New("compression-bench: unavailable algorithm")
)

Functions

func Decode

func Decode(r io.ReadCloser) ([]byte, error)

func Encode

func Encode(w io.WriteCloser, b []byte) error

func NewReader

func NewReader(r io.Reader) io.ReadCloser

Types

type Algorithm

type Algorithm uint8
const (
	DEFLATE Algorithm = iota + 1
	GZIP
	ZLIB
	LZW
	BZIP2
	LZ4
	BROTLI
	SNAPPY
	ZSTD
	LZMA
)

func (Algorithm) BestCompressionWriter

func (a Algorithm) BestCompressionWriter(w io.Writer) (io.WriteCloser, error)

func (Algorithm) BestSpeedWriter

func (a Algorithm) BestSpeedWriter(w io.Writer) (io.WriteCloser, error)

func (Algorithm) DefaultWriter

func (a Algorithm) DefaultWriter(w io.Writer) (io.WriteCloser, error)

func (Algorithm) IsConfigurable

func (a Algorithm) IsConfigurable() bool

func (Algorithm) Name

func (a Algorithm) Name() string

func (Algorithm) Reader

func (a Algorithm) Reader(b []byte) (io.ReadCloser, error)

func (Algorithm) Writer

func (a Algorithm) Writer(w io.Writer) (io.WriteCloser, error)

Jump to

Keyboard shortcuts

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