encoding

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package encoding provides functions for working with conversions of numbers, structures, strings and bytes.

Package functions: 1. HexEncode/HexDecode 2. Uint64ToBytes/BytesToUint64 3. Serialize/Deserialize

Index

Constants

View Source
const (
	CSizeUint64 = 8 // bytes

)

Variables

View Source
var (
	ErrDeserialize = errors.New("deserialize bytes")
)

Functions

func BytesToUint64

func BytesToUint64(pBytes [cSizeUint64]byte) uint64

Slice of bytes to uint64 by big endian.

func DeserializeJSON added in v1.5.22

func DeserializeJSON(pData []byte, pRes interface{}) error

func DeserializeYAML added in v1.5.22

func DeserializeYAML(pData []byte, pRes interface{}) error

func HexDecode

func HexDecode(pData string) []byte

func HexEncode

func HexEncode(pData []byte) string

func SerializeJSON added in v1.5.22

func SerializeJSON(pData interface{}) []byte

func SerializeYAML added in v1.5.22

func SerializeYAML(pData interface{}) []byte

func Uint64ToBytes

func Uint64ToBytes(pNum uint64) [cSizeUint64]byte

Uint64 to slice of bytes by big endian.

Types

This section is empty.

Jump to

Keyboard shortcuts

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