base92

package
v0.0.0-...-f214a0b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StdEncoding = NewEncoding(encodeStd)

StdEncoding is the default encoding enc.

Functions

This section is empty.

Types

type Encoding

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

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

func NewEncoding

func NewEncoding(encoder string) *Encoding

NewEncoding returns a new Encoding defined by the given alphabet, which must be a 92-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(str string) ([]byte, error)

DecodeString decodes a Base92 string into binary bytes.

func (*Encoding) Encode

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

EncodeToString encodes binary bytes into a Base92 string.

func (*Encoding) EncodeToString

func (enc *Encoding) EncodeToString(bin []byte) string

EncodeToString encodes binary bytes into Base92 bytes.

Jump to

Keyboard shortcuts

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