compressor

package
v0.0.0-...-11dff32 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Snappy = SnappyCompressor{}

Functions

This section is empty.

Types

type Compressor

type Compressor interface {
	Encode([]byte) ([]byte, error)
	Decode([]byte) ([]byte, error)
	Type() string
}

Compressor is interface, each compressor has Zip and Unzip functions

type GzipCompressor

type GzipCompressor struct {
}

GzipCompressor implements the Compressor interface

func (GzipCompressor) Decode

func (_ GzipCompressor) Decode(data []byte) ([]byte, error)

Unzip .

func (GzipCompressor) Encode

func (_ GzipCompressor) Encode(data []byte) ([]byte, error)

Zip .

func (GzipCompressor) Type

func (GzipCompressor) Type() string

type RawCompressor

type RawCompressor struct {
}

RawCompressor implements the Compressor interface

func (RawCompressor) Decode

func (_ RawCompressor) Decode(data []byte) ([]byte, error)

Unzip .

func (RawCompressor) Encode

func (_ RawCompressor) Encode(data []byte) ([]byte, error)

Zip .

func (RawCompressor) Type

func (RawCompressor) Type() string

type SnappyCompressor

type SnappyCompressor struct {
}

SnappyCompressor implements the Compressor interface

func (SnappyCompressor) Decode

func (_ SnappyCompressor) Decode(data []byte) ([]byte, error)

Unzip .

func (SnappyCompressor) Encode

func (_ SnappyCompressor) Encode(data []byte) ([]byte, error)

Zip .

func (SnappyCompressor) Type

func (SnappyCompressor) Type() string

type ZlibCompressor

type ZlibCompressor struct {
}

ZlibCompressor implements the Compressor interface

func (ZlibCompressor) Decode

func (_ ZlibCompressor) Decode(data []byte) ([]byte, error)

Unzip .

func (ZlibCompressor) Encode

func (_ ZlibCompressor) Encode(data []byte) ([]byte, error)

Zip .

func (ZlibCompressor) Type

func (ZlibCompressor) Type() string

Jump to

Keyboard shortcuts

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