null

package
v4.1.16 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultEncoder = New()

DefaultEncoder proivdes a globally usable null encoder / DefaultEncoder Since all null compression / decompression actions are stateless it is safe

Functions

This section is empty.

Types

type Encoder

type Encoder struct{}

Encoder compresses data without any algorithm

func New

func New() *Encoder

New creates a new Null encoder which does not manipulate the original data in any way. It's meant to be used where no compression is desired

func (*Encoder) Close

func (e *Encoder) Close() error

Close will close the encoder and release potentially allocated resources

func (*Encoder) Compress

func (e *Encoder) Compress(data, _ []byte, dst io.Writer) (n int, err error)

Compress directly writes "data" to "dst" without any further manipulation

func (*Encoder) Decompress

func (e *Encoder) Decompress(_, out []byte, src io.Reader) (n int, err error)

Decompress runs no decompression on the data read from src. It's directly written to "out"

func (*Encoder) SetLevel

func (e *Encoder) SetLevel(_ int)

SetLevel sets / changes the compression level (if supported)

func (*Encoder) Type

func (e *Encoder) Type() encoders.Type

Type will return the type of encoder

Jump to

Keyboard shortcuts

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