compress

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const FloatCompressAlgorithmMLF = "mlf"
View Source
const (
	RLEBlockLimit = 1 << 14
)

Variables

This section is empty.

Functions

func GetGzipReader added in v1.4.0

func GetGzipReader(r io.Reader) (*gzip.Reader, error)

func GetGzipWriter added in v1.4.0

func GetGzipWriter(w io.Writer) (io.Writer, func())

func GetLz4Writer added in v1.4.0

func GetLz4Writer(w io.Writer) (io.Writer, func())

func GetSnappyBlockWriter added in v1.4.1

func GetSnappyBlockWriter(w io.Writer) (io.Writer, func())

func GetSnappyWriter added in v1.4.0

func GetSnappyWriter(w io.Writer) (io.Writer, func())

func GetZstdWriter added in v1.4.0

func GetZstdWriter(w io.Writer) (io.Writer, func())

func GorillaDecoding

func GorillaDecoding(in []byte, out []byte) ([]byte, error)

func GorillaEncoding

func GorillaEncoding(in []byte, out []byte) ([]byte, error)

func Init added in v1.3.0

func Init()

func IsEnableMLF added in v1.3.0

func IsEnableMLF() bool

func PutGzipReader added in v1.4.0

func PutGzipReader(zr *gzip.Reader)

PutGzipReader returns back gzip reader obtained via GetGzipReader.

func SnappyDecoding

func SnappyDecoding(in, out []byte) ([]byte, error)

func SnappyEncoding

func SnappyEncoding(in []byte, out []byte) ([]byte, error)

Types

type Context

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

func GenerateContext

func GenerateContext(values []float64) *Context

func (*Context) NotCompress

func (ctx *Context) NotCompress() bool

func (*Context) RLE

func (ctx *Context) RLE() bool

func (*Context) Release

func (ctx *Context) Release()

func (*Context) Same

func (ctx *Context) Same() bool

func (*Context) Snappy

func (ctx *Context) Snappy() bool

type Float

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

func NewFloat

func NewFloat() *Float

func (*Float) AdaptiveDecoding

func (c *Float) AdaptiveDecoding(in, out []byte) ([]byte, error)

func (*Float) AdaptiveEncoding

func (c *Float) AdaptiveEncoding(in []byte, out []byte) ([]byte, error)

type RLE

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

func NewRLE

func NewRLE(step int) *RLE

func (*RLE) Decoding

func (rle *RLE) Decoding(in, out []byte) ([]byte, error)

func (*RLE) Encoding

func (rle *RLE) Encoding(in []byte, out []byte) ([]byte, error)

func (*RLE) SameValueDecoding

func (rle *RLE) SameValueDecoding(in, out []byte) ([]byte, error)

func (*RLE) SameValueEncoding

func (rle *RLE) SameValueEncoding(in []byte, out []byte) ([]byte, error)

type SnappyBlockWriter added in v1.4.1

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

func NewSnappyBlockWriter added in v1.4.1

func NewSnappyBlockWriter(w io.Writer) *SnappyBlockWriter

func (*SnappyBlockWriter) Close added in v1.4.1

func (w *SnappyBlockWriter) Close() error

func (*SnappyBlockWriter) Reset added in v1.4.1

func (w *SnappyBlockWriter) Reset(writer io.Writer)

func (*SnappyBlockWriter) Write added in v1.4.1

func (w *SnappyBlockWriter) Write(b []byte) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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