base85

package
v0.0.0-...-2767ca7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2017 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

package base85 This package provides a RFC1924 implementation of base85 encoding.

See http://www.ietf.org/rfc/rfc1924.txt

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(dst, src []byte) (int, error)

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

func DecodeString(src string) ([]byte, error)

DecodeString returns the bytes represented by the base85 string s.

func DecodedLen

func DecodedLen(n int) int

DecodedLen returns the maximum length in bytes of the decoded data corresponding to n bytes of base85-encoded data.

func Encode

func Encode(dst, src []byte) int

Encode encodes src into dst, return the bytes written The dst must have size of EncodedLen(len(src))

func EncodeToString

func EncodeToString(src []byte) string

EncodeToString returns the base85 encoding of src.

func EncodedLen

func EncodedLen(n int) int

EncodedLen returns the length in bytes of the base64 encoding of an input buffer of length n.

func NewDecoder

func NewDecoder(r io.Reader) io.Reader

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL