bytes

package
v0.0.0-...-15ff628 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitIsSet

func BitIsSet(b, bit byte) bool

BitIsSet checks whether a bit is set in a byte.

func ByteToBinaryString

func ByteToBinaryString(b byte) string

ByteToBinaryString converts a byte to a bit string

func Decode

func Decode(stream []byte) (int, error)

Decode takes an encoded Remaining Length slice of bytes and decodes it into an integer. Returns an additional error if the decoding fails.

func Encode

func Encode(x int) (encoded []byte)

Encode takes an integer representing Remaining Length and encodes it according to the MQTT spec.

Types

This section is empty.

Jump to

Keyboard shortcuts

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