compressor

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compressor

type Compressor interface {
	Compress(value []byte) ([]byte, error)
	Decompress(value []byte) ([]byte, error)
}

Compressor represents the set of actions needed to compress / decompress a piece of data

type LZWCompressor

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

LZWCompressor represents a compressor using the LZW formula for compression

func NewLZWCompressor

func NewLZWCompressor(width int) LZWCompressor

NewLZWCompressor returns a compressor using the LZW formula for compression

func (LZWCompressor) Compress

func (l LZWCompressor) Compress(value []byte) ([]byte, error)

Compress compresses a series of bytes, and returns the compressed data in bytes

func (LZWCompressor) Decompress

func (l LZWCompressor) Decompress(value []byte) ([]byte, error)

Decompress decompresses a series of bytes, and returns the compressed data in bytes

type ZlibCompressor

type ZlibCompressor struct {
}

ZlibCompressor represents a Compressor using ZLib

func NewZlibCompressor

func NewZlibCompressor() ZlibCompressor

NewZlibCompressor returns a new instance of a Compressor using the ZLib format

func (ZlibCompressor) Compress

func (z ZlibCompressor) Compress(value []byte) ([]byte, error)

Compress compresses a series of bytes, and returns the compressed data in bytes

func (ZlibCompressor) Decompress

func (z ZlibCompressor) Decompress(value []byte) ([]byte, error)

Decompress decompresses a series of bytes, and returns the compressed data in bytes

Jump to

Keyboard shortcuts

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