compress

package
v0.0.0-...-8218a20 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeIdentity Mode = iota
	ModeUnknown
	ModeS2
	ModeGzip

	ModeIdentityName = "identity"
	ModeS2Name       = "s2"
	ModeGzipName     = "gzip"
	ModeUknownName   = "unknown"
)

Enumerate available modes and their textual names

Variables

This section is empty.

Functions

func NewCompressedContainer

func NewCompressedContainer(container stow.Container, mode Mode) stow.Container

NewCompressedContainer wraps the provided container in transparent compression and decompression

Types

type Mode

type Mode uint8

Mode represents a compression mode

func ModeFromName

func ModeFromName(name string) Mode

ModeFromName constructs a Mode from a textual name

func (Mode) AlgoName

func (m Mode) AlgoName() string

AlgoName returns the textual name of a Mode

func (Mode) NewReader

func (m Mode) NewReader(rdr io.Reader) (io.Reader, error)

NewReader constructs a reader wrapper that applies this mode's decompression

func (Mode) NewWriter

func (m Mode) NewWriter(wtr io.WriteCloser) (io.WriteCloser, error)

NewWriter constructs a writer wrapper that applies this mode's compression

func (Mode) String

func (m Mode) String() string

String is a synonym for AlgoName

Jump to

Keyboard shortcuts

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