Documentation ¶
Overview ¶
Package babble implements Bubble Babble encoding and decoding, as specified by http://wiki.yak.net/589.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode decodes a Babble string into the corresponding byte array. Returns the number of bytes decoded, and an error if the string isn't a Babble string. Once Decode encounters a Babble data terminator in the src data, it stops decoding and returns the number of bytes read, regardless of whether there is more data remaining.
func DecodeString ¶
DecodeString decodes a babble string, returning the resulting byte array.
func EncodeToString ¶
EncodeToString returns the Bubble Babble encoding of src.
func EncodedLen ¶
EncodeLen returns the number of bytes an encoded n bytes will take.
func MaxDecodedLen ¶
MaxDecodedLen returns the maximum number of bytes a decoding of a Babble string of length n will take. There may be a difference of one byte in the result length for the same input length depending on the content.
Types ¶
type CorruptInputError ¶
type CorruptInputError int64
func (CorruptInputError) Error ¶
func (e CorruptInputError) Error() string