bytes

package
v1.0.54 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToU16

func BytesToU16(b []byte) uint16

BytesToU16 converts the given byte slice to uint16

func BytesToU32

func BytesToU32(b []byte) uint32

BytesToU32 converts the given byte slice to uint32

func BytesToU32Slice

func BytesToU32Slice(b []byte) []uint32

BytesToU32Slice converts the given byte slice to uint32 slice

func BytesToU64

func BytesToU64(b []byte) uint64

BytesToU64 converts the given byte slice to uint64

func BytesToU64Slice

func BytesToU64Slice(b []byte) []uint64

BytesToU64Slice converts the given byte slice to uint64 slice

func IBytesToString

func IBytesToString(size uint64, precision int) string

IBytesToString converts size in bytes to human readable format. The code is taken from humanize library and changed to provide value upto custom decimal precision. IBytesToString(12312412, 1) -> 11.7 MiB

func U16ToBytes

func U16ToBytes(v uint16) []byte

U16ToBytes converts the given Uint16 to bytes

func U32SliceToBytes

func U32SliceToBytes(u32s []uint32) []byte

U32SliceToBytes converts the given Uint32 slice to byte slice

func U32ToBytes

func U32ToBytes(v uint32) []byte

U32ToBytes converts the given Uint32 to bytes

func U64SliceToBytes

func U64SliceToBytes(u64s []uint64) []byte

U64SliceToBytes converts the given Uint64 slice to byte slice

func U64ToBytes

func U64ToBytes(v uint64) []byte

U64ToBytes converts the given Uint64 to bytes

func U8ToByte

func U8ToByte(v uint8) byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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