compressorlib

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: CC0-1.0, CC0-1.0, CC0-1.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compressor

type Compressor struct {
	io.WriteCloser
	// contains filtered or unexported fields
}

Compressor describes a compressor.

func CompressorArg

func CompressorArg(c *rt.GoCont, n int) (*Compressor, error)

CompressorArg turns a continuation argument into a *Compressor.

func NewCompressor

func NewCompressor(t compress.Type, w io.Writer) (*Compressor, error)

NewCompressor returns a new compressor of type t wrapping w. A finaliser is set on the returned compressor (via runtime.SetFinalizer) so that it is automatically closed when garbage collected.

func ValueToCompressor

func ValueToCompressor(v rt.Value) (*Compressor, bool)

ValueToCompressor turns a Lua value to a *Compressor if possible.

func (*Compressor) Close

func (c *Compressor) Close() error

Close closes the compressor.

func (*Compressor) Flush

func (c *Compressor) Flush() error

Flush flushes any cached data.

func (*Compressor) IsClosed

func (c *Compressor) IsClosed() bool

IsClosed returns true iff the compressor is known to be closed.

func (*Compressor) String

func (c *Compressor) String() string

String returns a string description of the compressor.

func (*Compressor) Type

func (c *Compressor) Type() compress.Type

Type returns the compressor type.

type Decompressor

type Decompressor struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

Decompressor describes a decompressor.

func DecompressorArg

func DecompressorArg(c *rt.GoCont, n int) (*Decompressor, error)

DecompressorArg turns a continuation argument into a *Decompressor.

func NewDecompressor

func NewDecompressor(t compress.Type, r io.Reader) (*Decompressor, error)

NewDecompressor returns a new decompressor of type t wrapping r. A finaliser is set on the returned decompressor (via runtime.SetFinalizer) so that it is automatically closed when garbage collected.

func ValueToDecompressor

func ValueToDecompressor(v rt.Value) (*Decompressor, bool)

ValueToDecompressor turns a Lua value to a *Decompressor if possible.

func (*Decompressor) Close

func (c *Decompressor) Close() error

Close closes the decompressor.

func (*Decompressor) IsClosed

func (c *Decompressor) IsClosed() bool

IsClosed returns true iff the decompressor is known to be closed.

func (*Decompressor) String

func (c *Decompressor) String() string

String returns a string description of the decompressor.

func (*Decompressor) Type

func (c *Decompressor) Type() compress.Type

Type returns the decompressor type.

Jump to

Keyboard shortcuts

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