Documentation ¶
Overview ¶
Package base91 implements base91 encoding, fork from https://github.com/mtraver/base91
Index ¶
Constants ¶
This section is empty.
Variables ¶
var StdEncoding = newEncoding(encodeStd)
StdEncoding is the standard base91 encoding (that is, the one specified at http://base91.sourceforge.net). Of the 95 printable ASCII characters, the following four are omitted: space (0x20), apostrophe (0x27), hyphen (0x2d), and backslash (0x5c).
Functions ¶
This section is empty.
Types ¶
type Encoding ¶
type Encoding struct {
// contains filtered or unexported fields
}
An Encoding is a base 91 encoding/decoding scheme defined by a 91-character alphabet.
func (*Encoding) Decode ¶
Decode decodes src using the encoding enc. It writes at most DecodedLen(len(src)) bytes to dst and returns the number of bytes written. If src contains invalid base91 data, it will return the number of bytes successfully written and CorruptInputError.
func (*Encoding) DecodedLen ¶
DecodedLen returns the maximum length in bytes of the decoded data corresponding to n bytes of base91-encoded data.
func (*Encoding) Encode ¶
Encode encodes src using the encoding enc, writing bytes to dst. It returns the number of bytes written, because the exact output size cannot be known before encoding takes place. EncodedLen(len(src)) may be used to determine an upper bound on the output size when allocating a dst slice.
func (*Encoding) EncodedLen ¶
EncodedLen returns an upper bound on the length in bytes of the base91 encoding of an input buffer of length n. The true encoded length may be shorter.