base62

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package base62 implements base62 encoding, fork from https://github.com/yihleego/base62

Index

Constants

This section is empty.

Variables

View Source
var StdEncoding = newEncoding(encodeStd)

StdEncoding is the standard base62 encoding.

Functions

This section is empty.

Types

type CorruptInputError

type CorruptInputError int64

func (CorruptInputError) Error

func (e CorruptInputError) Error() string

type Encoding

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

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

func (*Encoding) Decode

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

Decode decodes src using the encoding enc. If src contains invalid base62 data, it will return the number of bytes successfully written and CorruptInputError. New line characters (\r and \n) are ignored.

func (*Encoding) Encode

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

Encode encodes src using the encoding enc.

Jump to

Keyboard shortcuts

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