compress

package
v1.335.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 5 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

Module for fx.

Functions

This section is empty.

Types

type Compressor

type Compressor interface {
	// Compress data.
	Compress(data []byte) []byte

	// Decompress data.
	Decompress(data []byte) ([]byte, error)
}

Compressor allows to have different ways to compress/decompress.

type Map

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

Map of compressor.

func NewMap

func NewMap() *Map

NewMap for compressor.

func (*Map) Get

func (f *Map) Get(kind string) Compressor

Get from kind.

func (*Map) Register

func (f *Map) Register(kind string, c Compressor)

Register kind and compressor.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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