compression

package
v0.0.0-...-b180f38 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompressionStrategy

type CompressionStrategy interface {
	Compress(ctx context.Context, data []byte) ([]byte, error)
	Decompress(ctx context.Context, data []byte) ([]byte, error)
	Algorithm() string
}

type GzipCompression

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

func NewGzipCompression

func NewGzipCompression(
	level int,
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
) *GzipCompression

func (*GzipCompression) Algorithm

func (c *GzipCompression) Algorithm() string

func (*GzipCompression) Compress

func (c *GzipCompression) Compress(ctx context.Context, data []byte) ([]byte, error)

func (*GzipCompression) Decompress

func (c *GzipCompression) Decompress(ctx context.Context, data []byte) ([]byte, error)

type ZstdCompression

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

func NewZstdCompression

func NewZstdCompression(
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
) (*ZstdCompression, error)

func (*ZstdCompression) Algorithm

func (c *ZstdCompression) Algorithm() string

func (*ZstdCompression) Compress

func (c *ZstdCompression) Compress(ctx context.Context, data []byte) ([]byte, error)

func (*ZstdCompression) Decompress

func (c *ZstdCompression) Decompress(ctx context.Context, data []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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