compression

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LzmaCompressor

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

func NewLzmaCompressor

func NewLzmaCompressor() *LzmaCompressor

func (*LzmaCompressor) Compress

func (lzma *LzmaCompressor) Compress(data []byte) ([]byte, error)

func (*LzmaCompressor) CompressWithValidation

func (lzma *LzmaCompressor) CompressWithValidation(data []byte) ([]byte, error)

func (*LzmaCompressor) Decompress

func (lzma *LzmaCompressor) Decompress(data []byte) ([]byte, error)

func (*LzmaCompressor) DecompressWithValidation

func (lzma *LzmaCompressor) DecompressWithValidation(data []byte) ([]byte, error)

func (*LzmaCompressor) GetCompressionRatio

func (lzma *LzmaCompressor) GetCompressionRatio(original, compressed []byte) float64

type Match

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

type ZlibCompressor

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

func NewZlibCompressor

func NewZlibCompressor() *ZlibCompressor

func (*ZlibCompressor) CalculateCrc32

func (z *ZlibCompressor) CalculateCrc32(data []byte) uint32

func (*ZlibCompressor) Compress

func (z *ZlibCompressor) Compress(data []byte) ([]byte, error)

func (*ZlibCompressor) CompressWithValidation

func (z *ZlibCompressor) CompressWithValidation(data []byte) ([]byte, error)

func (*ZlibCompressor) Decompress

func (z *ZlibCompressor) Decompress(data []byte) ([]byte, error)

func (*ZlibCompressor) DecompressWithValidation

func (z *ZlibCompressor) DecompressWithValidation(data []byte) ([]byte, error)

func (*ZlibCompressor) GetCompressionRatio

func (z *ZlibCompressor) GetCompressionRatio(original, compressed []byte) float64

func (*ZlibCompressor) GetLevel

func (z *ZlibCompressor) GetLevel() int

func (*ZlibCompressor) SetLevel

func (z *ZlibCompressor) SetLevel(level int) error