Package-Level Type Names (only one, which is exported)
/* sort exporteds by: | */
An Encoding is a radix 64 encoding/decoding scheme, defined by a
64-character alphabet.base*base64.Encodingdecfunc(dst []byte, src []byte, lut *int8) (int, int)declut[48]int8encfunc(dst []byte, src []byte, lut *int8) (int, int)enclut[32]int8 Decode decodes src using the defined encoding alphabet.
This will write DecodedLen(len(src)) bytes to dst and return the number of
bytes written. DecodeString decodes the base64 encoded string s, returns the decoded
value as bytes. DecodedLen calculates the decoded byte length for a base64-encoded message
of length n. Encode encodes src using the defined encoding alphabet.
This will write EncodedLen(len(src)) bytes to dst. Encode encodes src using the encoding enc, writing
EncodedLen(len(src)) bytes to dst. EncodedLen calculates the base64-encoded byte length for a message
of length n. Strict creates a duplicate encoding updated with strict decoding enabled.
This requires that trailing padding bits are zero. WithPadding creates a duplicate Encoding updated with a specified padding
character, or NoPadding to disable padding. The padding character must not
be contained in the encoding alphabet, must not be '\r' or '\n', and must
be no greater than '\xFF'.(*Encoding) enableDecodeAVX2(encoder string)(*Encoding) enableEncodeAVX2(encoder string)
func NewEncoding(encoder string) *Encoding
func Encoding.Strict() *Encoding
func Encoding.WithPadding(padding rune) *Encoding
func newEncoding(encoder string) *Encoding
var RawStdEncoding *Encoding
var RawURLEncoding *Encoding
var StdEncoding *Encoding
var URLEncoding *Encoding
Package-Level Functions (total 5, in which 1 is exported)
NewEncoding returns a new padded Encoding defined by the given alphabet,
which must be a 64-byte string that does not contain the padding character
or CR / LF ('\r', '\n'). Unlike the standard library, the encoding alphabet
cannot be abitrary, and it must follow one of the know standard encoding
variants.
Required alphabet values:
* [0,26): characters 'A'..'Z'
* [26,52): characters 'a'..'z'
* [52,62): characters '0'..'9'
Flexible alphabet value options:
* RFC 4648, RFC 1421, RFC 2045, RFC 2152, RFC 4880: '+' and '/'
* RFC 4648 URI: '-' and '_'
* RFC 3501: '+' and ','
The resulting Encoding uses the default padding character ('='), which may
be changed or disabled via WithPadding. The padding characters is urestricted,
but it must be a character outside of the encoder alphabet.
The pages are generated with Goldsv0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.