compress

package
v0.0.0-...-255a7ba Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: LGPL-2.1 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrNotSupported indicates that given algorithm is not supported.
	ErrNotSupported = Error("not supported")
	// ErrNilInput indicates that given data is nil.
	ErrNilInput = Error("nil input")
)
View Source
const (
	// Gzip is gzip compression
	Gzip = Algorithm("gzip")
)

Variables

This section is empty.

Functions

func Compress

func Compress(algorithm Algorithm, in []byte, opts ...Options) (out []byte, err error)

Compress compresses data with specified algorithm

func Uncompress

func Uncompress(algorithm Algorithm, in []byte, opts ...Options) (out []byte, err error)

Uncompress uncompress data with specified algorithm

Types

type Algorithm

type Algorithm string

Algorithm indicates suported Algorithms in this package

type Error

type Error string

Error is a inner error type

func (Error) Error

func (e Error) Error() string

type Options

type Options struct {
	Name    string
	Comment string
	MaxRead int
}

Options indicates compress/uncompress options

Jump to

Keyboard shortcuts

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