escDecoder

package
v0.56.3 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEscDecoder

func NewEscDecoder(lut id.TriceIDLookUp, m *sync.RWMutex, in io.Reader, endian bool) decoder.Decoder

NewEscDecoder provides an EscDecoder instance. l is the trice id list in slice of struct format. in is the usable reader for the input bytes.

Types

type Esc

type Esc struct {
	decoder.DecoderData
	// contains filtered or unexported fields
}

Esc is the Decoding instance for esc encoded trices.

func (*Esc) Read

func (p *Esc) Read(b []byte) (n int, err error)

Read is the provided read method for esc decoding of next string as byte slice. It uses inner reader p.in and internal id look-up table to fill b with a string. b is a slice of bytes with a len for the max expected string size. n is the count of read bytes inside b. Read returns one trice string or nothing.

Jump to

Keyboard shortcuts

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