baseenc

package
v1.0.3002 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoding

type Encoding struct {
	// contains filtered or unexported fields
}

An Encoding is a base radix encoding/decoding scheme defined by a radix-character alphabet.

func NewEncoding

func NewEncoding(name string, radix int64, encoder string) *Encoding

NewEncoding returns a new Encoding defined by the given alphabet, which must be a radix-byte string that does not contain CR or LF ('\r', '\n').

func (*Encoding) Decode

func (enc *Encoding) Decode(src []byte) ([]byte, error)

Decode decodes src using the encoding enc.

func (*Encoding) DecodeString

func (enc *Encoding) DecodeString(input string) (output []byte, err error)

DecodeString decodes src using the encoding enc.

func (*Encoding) Encode

func (enc *Encoding) Encode(input []byte) []byte

Encode encodes binary bytes into Base bytes.

func (*Encoding) EncodeToString

func (enc *Encoding) EncodeToString(input []byte) (output string)

EncodeToString encodes binary bytes into Base bytes.

Jump to

Keyboard shortcuts

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