const lineMaxLen … type Writer … // NewWriter returns a new [Writer] that writes to w. func NewWriter(w io.Writer) *Writer { … } // 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) { … } // 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 { … } // write limits text encoded in quoted-printable to 76 characters per line. func (w *Writer) write(p []byte) error { … } func (w *Writer) encode(b byte) error { … } const upperhex … // checkLastByte encodes the last buffered byte if it is a space or a tab. func (w *Writer) checkLastByte() error { … } func (w *Writer) insertSoftLineBreak() error { … } func (w *Writer) insertCRLF() error { … } func (w *Writer) flush() error { … } func isWhitespace(b byte) bool { … }