compressor

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Compressors which supported by rpc

Functions

This section is empty.

Types

type CompressType

type CompressType uint16

CompressType type of compressions supported by rpc

const (
	Raw CompressType = iota
	Gzip
	Snappy
	Zlib
)

type Compressor

type Compressor interface {
	Zip([]byte) ([]byte, error)
	Unzip([]byte) ([]byte, error)
}

Compressor is interface, each compressor has Zip and Unzip functions

type GzipCompressor

type GzipCompressor struct {
}

GzipCompressor implements the Compressor interface

func (GzipCompressor) Unzip

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

Unzip .

func (GzipCompressor) Zip

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

Zip .

type RawCompressor

type RawCompressor struct {
}

RawCompressor implements the Compressor interface

func (RawCompressor) Unzip

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

Unzip .

func (RawCompressor) Zip

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

Zip .

type SnappyCompressor

type SnappyCompressor struct {
}

SnappyCompressor implements the Compressor interface

func (SnappyCompressor) Unzip

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

Unzip .

func (SnappyCompressor) Zip

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

Zip .

type ZlibCompressor

type ZlibCompressor struct {
}

ZlibCompressor implements the Compressor interface

func (ZlibCompressor) Unzip

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

Unzip .

func (ZlibCompressor) Zip

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

Zip .

Jump to

Keyboard shortcuts

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