Documentation
¶
Overview ¶
Package base45 implements base45 encoding as specified by draft-faltstrom-base45-06.
Index ¶
- func Decode(dst, src []byte) (n int, err error)
- func DecodeString(s string) ([]byte, error)
- func DecodedLen(n int) int
- func Encode(dst, src []byte)
- func EncodeToString(src []byte) string
- func EncodedLen(n int) int
- func NewDecoder(r io.Reader) io.Reader
- func NewEncoder(w io.Writer) io.WriteCloser
- type CorruptInputError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeString ¶
DecodeString returns the bytes represented by the base45 string s.
func DecodedLen ¶
DecodedLen returns the maximum length in bytes of the decoded data corresponding to n bytes of base45-encoded data
func Encode ¶
func Encode(dst, src []byte)
Encode encodes src using the encoding enc, writing EncodedLen(len(src)) bytes to dst.
The encoding pads the output to a multiple of 3 bytes, so Encode is not appropriate for use on individual blocks of a large data stream. Use NewEncoder() instead.
func EncodeToString ¶
EncodeToString returns the base45 encoding of src.
func EncodedLen ¶
EncodedLen returns the length in bytes of the base45 encoding of an input buffer of length n.
func NewDecoder ¶
NewDecoder constructs a new base45 stream decoder.
func NewEncoder ¶
func NewEncoder(w io.Writer) io.WriteCloser
NewEncoder returns a new base45 stream encoder. Base45 encodings operate in 3-byte blocks; when finished writing, the caller must Close the returned encoder to flush any partially written blocks.
Types ¶
type CorruptInputError ¶
type CorruptInputError int64
func (CorruptInputError) Error ¶
func (e CorruptInputError) Error() string