binaryutil

package
v0.0.0-...-4c77bb5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package binaryutil contains convenience wrappers around encoding/binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteOrder

type ByteOrder interface {
	PutUint16(v uint16) []byte
	PutUint32(v uint32) []byte
	PutUint64(v uint64) []byte
	Uint32(b []byte) uint32
	Uint64(b []byte) uint64
}

ByteOrder is like binary.ByteOrder, but allocates memory and returns byte slices, for convenience.

var BigEndian ByteOrder = &bigEndian{}

BigEndian is like binary.BigEndian, but allocates memory and returns byte slices, for convenience.

var NativeEndian ByteOrder = &nativeEndian{}

NativeEndian is either little endian or big endian, depending on the native endian-ness, and allocates memory and returns byte slices, for convenience.

Jump to

Keyboard shortcuts

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