byteutil

package
v0.0.0-...-067d226 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToIOReader

func BytesToIOReader(buf []byte) io.Reader

BytesToIOReader bytes => io.Reader

func BytesToJpeg

func BytesToJpeg(buf []byte) (image.Image, error)

BytesToJpeg ...

func BytesToPng

func BytesToPng(buf []byte) (image.Image, error)

BytesToPng ...

func BytesToString

func BytesToString(b []byte) string

BytesToString 强制转换 string(s)

func BytesToUint64

func BytesToUint64(b []byte) uint64

BytesToUint64 byte转uint64

func IOReaderToBytes

func IOReaderToBytes(r io.Reader) ([]byte, error)

IOReaderToBytes read contents from io.Reader

func Join

func Join(s [][]byte) []byte

Join 数据合并

func JpegToBytes

func JpegToBytes(img image.Image) ([]byte, error)

JpegToBytes ...

func PngToBytes

func PngToBytes(img image.Image) ([]byte, error)

PngToBytes ...

func Split

func Split(buf []byte, limit int) [][]byte

Split 数据分片

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes 强制转换 []byte(s)

func Uint64ToBytes

func Uint64ToBytes(i uint64) []byte

Uint64ToBytes uint64转byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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