Documentation
¶
Overview ¶
package base85 This package provides a RFC1924 implementation of base85 encoding.
See http://www.ietf.org/rfc/rfc1924.txt Based on: https://pkgo.dev/github.com/jamesruan/go-rfc1924
Index ¶
- func Decode(dst, src []byte) (int, error)
- func DecodeString(src string) ([]byte, error)
- func DecodedLen(n int) int
- func Encode(dst, src []byte) int
- 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 Decode ¶
Decode decodes src into dst, return the bytes written The dst must have size of DecodedLen(len(src)) An CorruptInputError is returned when invalid character is found in src.
func DecodeString ¶
DecodeString returns the bytes represented by the base85 string s.
func DecodedLen ¶
DecodedLen returns the maximum length in bytes of the decoded data corresponding to n bytes of base85-encoded data.
func Encode ¶
Encode encodes src into dst, return the bytes written The dst must have size of EncodedLen(len(src))
func EncodeToString ¶
EncodeToString returns the base85 encoding of src.
func EncodedLen ¶
EncodedLen returns the length in bytes of the base85 encoding of an input buffer of length n.
func NewDecoder ¶
NewDecoder returns a stream decoder of r. All read from the reader will read the base85 encoded string from r and decode it.
func NewEncoder ¶
func NewEncoder(w io.Writer) io.WriteCloser
NewEncoder returns a stream encoder of w. All write to the encoder is encoded into base85 and write to w. The writer should call Close() to indicate the end of stream
Types ¶
type CorruptInputError ¶
type CorruptInputError int64
func (CorruptInputError) Error ¶
func (e CorruptInputError) Error() string