gcompress

package
v0.0.0-...-04ff805 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CompNone   = enrollComp("none")
	CompSnappy = enrollComp("snappy")
	CompS2     = enrollComp("s2")
	CompZip    = enrollComp("zip")
	CompGzip   = enrollComp("gzip")
	CompPgZip  = enrollComp("pgzip")
	CompZStd   = enrollComp("zstd")
	CompZLib   = enrollComp("zlib")
	CompFlate  = enrollComp("flate")
)

Functions

func NewFileCompress

func NewFileCompress(inputFilename, outputFilename string, algo Comp) error

Types

type BufferCompress

type BufferCompress struct {
	// contains filtered or unexported fields
}

func NewBufferCompress

func NewBufferCompress(inBuf []byte, outBuf bytes.Buffer, algo Comp) (*BufferCompress, error)

type Comp

type Comp string

func ToComp

func ToComp(algo string) (Comp, error)

type CompParam

type CompParam struct {
	Level int
}

func (CompParam) Verify

func (p CompParam) Verify(algo Comp) error

type CompReadWriteCloser

type CompReadWriteCloser struct {
	// contains filtered or unexported fields
}

CompReadWriteCloser implements io.ReadWriteCloser

func NewCompReadWriteCloser

func NewCompReadWriteCloser(compAlgo Comp, param *CompParam, rwc io.ReadWriteCloser) (*CompReadWriteCloser, error)

NewCompReadWriteCloser create compress-orient ReadWriteCloser.

func (*CompReadWriteCloser) Close

func (c *CompReadWriteCloser) Close() error

Close implements io.ReadWriteCloser.

func (*CompReadWriteCloser) Read

func (c *CompReadWriteCloser) Read(p []byte) (n int, err error)

Read implements io.ReadWriteCloser.

func (*CompReadWriteCloser) Write

func (c *CompReadWriteCloser) Write(p []byte) (n int, err error)

Write implements io.ReadWriteCloser.

type FileCompress

type FileCompress struct {
}

Jump to

Keyboard shortcuts

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