codec

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(bs []byte) ([]byte, error)

Base64Decode decode base64 of []byte

func Base64DecodeFromString

func Base64DecodeFromString(s string) ([]byte, error)

Base64DecodeFromString decode base64 of string minimal use of copy

func Base64Encode

func Base64Encode(src []byte) []byte

Base64Encode decode base64 of []byte

func Base64EncodeToString

func Base64EncodeToString(src []byte) string

Base64EncodeToString encode base64 to string minimal use of copy

func BytesToString

func BytesToString(b []byte) string

BytesToString converts byte slice to string without a memory allocation.

func HexDecode

func HexDecode(bs []byte) (dst []byte, err error)

HexDecode decode hex

func HexDecodeFromString

func HexDecodeFromString(s string) (bs []byte, err error)

HexDecodeFromString decode hex from string

func HexEncode

func HexEncode(src []byte) []byte

HexEncode encode hex

func HexEncodeToString

func HexEncodeToString(src []byte) string

HexEncodeToString encode hex to string

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes converts string to byte slice without a memory allocation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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