base62

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

base62 supports Base62 encoding and decoding.

Index

Constants

View Source
const (
	AlphabetBase62         = basex.AlphabetBase62
	AlphabetBase62Gobigint = basex.AlphabetBase62Gobigint
)

Variables

This section is empty.

Functions

func DecodeGunzip

func DecodeGunzip(encoded string) ([]byte, error)

DecodeGunzip base62 decodes a string with optional gzip uncompression.

func DecodeGunzipJSON

func DecodeGunzipJSON(encoded string, output any) error

DecodeGunzipJSON base62 decodes a string with optoinal gunzip uncompression and then unmarshals the data to a struct.

func EncodeGzip

func EncodeGzip(data []byte, compressLevel int) (string, error)

Encode with optional gzip compression. 0 = no compression. 9 = best compression. Currently, compression is disabled as github.com/lytics/base62 does not appear to support it properly.

func EncodeGzipJSON

func EncodeGzipJSON(data any, compressLevel int) (string, error)

EncodeGzipJSON encodes a struct that is JSON encoded.

func Pad

func Pad(encoded string) string

func StripPadding

func StripPadding(encoded string) string

func ValidBase62

func ValidBase62(encoded string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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