decoder

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constructor

type Constructor func(buffer []byte) Decoder

type Decoder

type Decoder interface {
	Decode(input []byte) (output []byte, err error)
}

func NewGZIPDecoder

func NewGZIPDecoder(outputBuff []byte) Decoder

type GZIPDecoder

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

func (*GZIPDecoder) Decode

func (g *GZIPDecoder) Decode(input []byte) (output []byte, err error)

type Manager

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

Manager manages all the attached decoders. In case there are no decoders, original data will be returned. Manager MUST be per-client, not per-instance

func NewManager

func NewManager(buffSize int64) *Manager

func (*Manager) Add

func (m *Manager) Add(token string, constructor Constructor)

func (*Manager) Decode

func (m *Manager) Decode(token string, encoded []byte) (decoded []byte, err error)

Jump to

Keyboard shortcuts

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