encoding

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: GPL-3.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSeeking error definition
	ErrSeeking = errors.New("Error seeking")
	// ErrMultipleOffsets error definition
	ErrMultipleOffsets = errors.New("Only one offset argument is allowed")
	// ErrInvalidNilPointer
	ErrInvalidNilPointer = errors.New("Nil pointer is invalid")
	// No Pointer interface
	ErrNoPointerInterface = errors.New("Interface expect to be a pointer")
)

Functions

func Marshal

func Marshal(data interface{}, endianness Endianness) ([]byte, error)

func UnmarshaInitSlice

func UnmarshaInitSlice(reader io.Reader, data interface{}, endianness Endianness) error

func Unmarshal

func Unmarshal(reader io.Reader, data interface{}, endianness Endianness) error

func Unpack

func Unpack(reader io.ReadSeeker, endianness Endianness, data interface{}, offsets ...int64) error

Unpack data type from reader object. An optional offset can be specified.

Types

type Endianness

type Endianness binary.ByteOrder

Endianness interface definition specifies the endianness used to decode

Jump to

Keyboard shortcuts

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