uuencode

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: MIT, MIT Imports: 6 Imported by: 0

README

uuencode/uudecode

I made this to decode UUEncoded selectors (item type '6') from Gopher servers... and then couldn't find a single UUEncoded thing to test it with.

I stopped bothering to polish it up after that. The fuzz tester found a lot of bugs but there will be more. Also would be good to get rid of that bufio.Writer in the encoder.

This was actually a lot trickier than I expected to get right - Read() can be a bit of a beast when every single byte could be in the middle of a big set of different states.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(rdr io.Reader, scratch []byte) *Reader

func (*Reader) File

func (r *Reader) File() (name string, ok bool)

func (*Reader) Mode

func (r *Reader) Mode() (mode os.FileMode, ok bool)

func (*Reader) Read

func (r *Reader) Read(b []byte) (n int, err error)

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func FileWriter

func FileWriter(w *os.File, file string, mode os.FileMode) (*Writer, error)

func NewWriter

func NewWriter(w io.Writer, file string, mode os.FileMode) *Writer

func (*Writer) Flush

func (w *Writer) Flush() error

func (*Writer) Write

func (w *Writer) Write(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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