encoding

package
v0.0.0-...-6d4690e Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2017 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteToBitString

func ByteToBitString(b byte) string

ByteToBitString converts a bye to a bit string

func ComposeByte

func ComposeByte(pos0 bool, pos1 bool, pos2 bool, pos3 bool, pos4 bool, pos5 bool, pos6 bool, pos7 bool) byte

ComposeByte sets a collection of bools as bits in a byte

func GetBoolBitValue

func GetBoolBitValue(b byte, position int) bool

GetBoolBitValue will return a boolean from the specified bosition in a byte

func ParseBoolToInt

func ParseBoolToInt(b bool) int

ParseBoolToInt parses a boolean to an integer (true=1, false=0)

func SetBit

func SetBit(n byte, pos uint, value bool) byte

SetBit sets the bit at pos in the integer n.

func SignedIntToBytes

func SignedIntToBytes(input int) (byte, byte)

SignedIntToBytes converts a signed integer to a pair of bytes

func UnsignedIntToBytes

func UnsignedIntToBytes(input int) (byte, byte)

UnsignedIntToBytes converts an unsigned integer to a pair of bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

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