bytesutil

package
v0.85.0-pre.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package bytesutil provides utility functions for byte slice operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromBase32Raw

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

FromBase32Raw decodes a base32-encoded string into a byte slice without padding.

func FromBase64

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

FromBase64 decodes a base64-encoded string into a byte slice.

func FromBase64URLRaw

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

FromBase64URLRaw decodes a base64 URL-safe encoded string into a byte slice without padding.

func FromGob

func FromGob[T any](gobBytes []byte) (T, error)

FromGob decodes a gob-encoded byte slice into a value of type T.

func FromGobInto

func FromGobInto(gobBytes []byte, destPtr any) error

FromGobInto decodes a gob-encoded byte slice into a destination. The destination must be a pointer to the destination type.

func ToBase32Raw

func ToBase32Raw(b []byte) string

ToBase32Raw encodes a byte slice into a base32-encoded string without padding.

func ToBase64

func ToBase64(b []byte) string

ToBase64 encodes a byte slice into a base64-encoded string.

func ToBase64URLRaw

func ToBase64URLRaw(b []byte) string

ToBase64URLRaw encodes a byte slice into a base64 URL-safe encoded string without padding.

func ToGob

func ToGob(src any) ([]byte, error)

ToGob encodes an arbitrary value into a gob-encoded byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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