decoder

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 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 Decoder

type Decoder interface {
	Decode(data *[]byte) ([]byte, error)
}

Decoder 解码器

type FixedLengthDecoder

type FixedLengthDecoder struct {
	FrameLength int
	// contains filtered or unexported fields
}

func NewFixedLengthDecoder

func NewFixedLengthDecoder(frameLength int) *FixedLengthDecoder

func (*FixedLengthDecoder) Decode

func (d *FixedLengthDecoder) Decode(data *[]byte) ([]byte, error)

func (*FixedLengthDecoder) Input

func (d *FixedLengthDecoder) Input(context *event.HandleContext, data interface{}) (interface{}, bool)

type LengthBased

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

func NewLengthBased

func NewLengthBased(lengthFieldOffset int, lengthFieldLength int, lengthAdjustment int, initialBytesToStrip int) *LengthBased

func (*LengthBased) Decode

func (l *LengthBased) Decode(data *[]byte) ([]byte, error)

func (*LengthBased) Input

func (l *LengthBased) Input(context *event.HandleContext, data interface{}) (interface{}, bool)

Jump to

Keyboard shortcuts

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