Documentation ¶
Overview ¶
Package z85 implements ZeroMQ Base-85 encoding as specified by http://rfc.zeromq.org/spec:32/Z85
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrLength = errors.New("z85: wrongly aligned input data")
ErrLength results from encoding or decoding wrongly aligned input data.
Functions ¶
func Decode ¶
Decode decodes z85 encoded src into DecodedLen(len(src)) bytes of dst, returning the number of bytes written to dst, always DecodedLen(len(src)). The len(src) must be divisible by 5, otherwise an ErrLength is returned. If Decode encounters invalid input bytes, it returns an InvalidByteError.
func DecodedLen ¶
DecodedLen returns the length in bytes of the decoded data corresponding to n bytes of z85-encoded data.
func Encode ¶
Encode encodes src into EncodedLen(len(src)) bytes of dst using z85 encoding, returning the number of bytes written to dst, always EncodedLen(len(src)). The len(src) must be divisible by 4, otherwise an ErrLength is returned.
func EncodedLen ¶
EncodedLen returns the length in bytes of the z85 encoding of an input buffer of length n.
Types ¶
type InvalidByteError ¶
type InvalidByteError byte
InvalidByteError values describe errors resulting from an invalid byte in a z85 encoded data.
func (InvalidByteError) Error ¶
func (e InvalidByteError) Error() string