Imports #
"bufio"
"bytes"
"fmt"
"io"
"io"
"bufio"
"bytes"
"fmt"
"io"
"io"
var crlf = *ast.CallExpr
var lf = *ast.CallExpr
const lineMaxLen = 76
var softSuffix = *ast.CallExpr
const upperhex = "0123456789ABCDEF"
Reader is a quoted-printable decoder.
type Reader struct {
br *bufio.Reader
rerr error
line []byte
}
A Writer is a quoted-printable writer that implements [io.WriteCloser].
type Writer struct {
Binary bool
w io.Writer
i int
line [78]byte
cr bool
}
Close closes the [Writer], flushing any unwritten data to the underlying [io.Writer], but does not close the underlying io.Writer.
func (w *Writer) Close() error
NewReader returns a quoted-printable reader, decoding from r.
func NewReader(r io.Reader) *Reader
NewWriter returns a new [Writer] that writes to w.
func NewWriter(w io.Writer) *Writer
Read reads and decodes quoted-printable data from the underlying reader.
func (r *Reader) Read(p []byte) (n int, err error)
Write encodes p using quoted-printable encoding and writes it to the underlying [io.Writer]. It limits line length to 76 characters. The encoded bytes are not necessarily flushed until the [Writer] is closed.
func (w *Writer) Write(p []byte) (n int, err error)
checkLastByte encodes the last buffered byte if it is a space or a tab.
func (w *Writer) checkLastByte() error
func (w *Writer) encode(b byte) error
func (w *Writer) flush() error
func fromHex(b byte) (byte, error)
func (w *Writer) insertCRLF() error
func (w *Writer) insertSoftLineBreak() error
func isQPDiscardWhitespace(r rune) bool
func isWhitespace(b byte) bool
func readHexByte(v []byte) (b byte, err error)
write limits text encoded in quoted-printable to 76 characters per line.
func (w *Writer) write(p []byte) error
Generated with Arrow