util

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(buffer io.Reader, byteOrder binary.ByteOrder, outputs ...interface{}) error

Decode decodes data from io reader to specified interfaces

Example:

var num1 uint16 var num2 uint32 // read the buffer 2 bytes and 4 bytes sequentially // decode and output corresponding uint16 and uint32 number into num1 and num2 respectively err := Decode(buffer, &num1, &num2)

func Encode added in v0.3.0

func Encode(buff io.Writer, byteOrder binary.ByteOrder, inputs ...interface{}) error

Encode writes the multiple inputs of different possible datatypes to the io writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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