Documentation
¶
Overview ¶
Package uu - Simple uuencode/uudecode
This package provides simple uuencoding and uudecoding. It is compatible with Perl's pack/unpack "u" template. See https://perldoc.perl.org/functions/pack for more details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidDataLen = errors.New(
"encoded data not a multiple of four characters",
)
ErrInvalidDataLen indicates the data part of the line was not a multiple of four characters.
Functions ¶
func AppendDecode ¶
AppendDecode decodes src, appends it to dst, and returns the extended buffer.
func AppendEncode ¶
AppendEncode encodes src, appends it to dst, and returns the extended buffer.
func MaxDecodedLen ¶
MaxDecodedLen eeturns a maximum number of bytes of the decoded form of b as required by AppendDecode. Accuracy is traded for O(1) execution; in practice AppendDecode will usuallu require less space.
func MaxEncodedLen ¶
MaxEncodedLen eeturns a maximum number of bytes of the encoded form of b as required by AppendEncode. Accuracy is traded for O(1) execution; in practice AppendEncode will usuallu require less space.
Types ¶
type DecodeError ¶
type DecodeError struct {
Line, Offset int /* Where the error occured. */
Err error /* What happened. */
}
DecodeError indicates where in the encoded data decoding failed.
func (DecodeError) Error ¶
func (err DecodeError) Error() string
Error implements the error interface.
type IncorrectDataLenError ¶
IncorrectDataLenError indicates the data part of the line was inconsistent with the length character.
func (IncorrectDataLenError) Error ¶
func (err IncorrectDataLenError) Error() string
Error implements the error interface.
type InvalidEncodedCharacterError ¶
type InvalidEncodedCharacterError rune
InvalidEncodedCharacterError indicates a line contained an invalid character.
func (InvalidEncodedCharacterError) Error ¶
func (err InvalidEncodedCharacterError) Error() string
Error implements the error interface.
type InvalidLengthCharacterError ¶
type InvalidLengthCharacterError rune
InvalidLengthCharacterError indicates a line's length (first) character indicated a length less than 0.
func (InvalidLengthCharacterError) Error ¶
func (err InvalidLengthCharacterError) Error() string
Error implements the error interface.