// Generated by Lisette bindgen
// Source: mime/quotedprintable (Go stdlib)
// Go: 1.25.5
// Lisette: 0.1.20

import "go:io"

pub fn NewReader(r: io.Reader) -> Ref<Reader>

pub fn NewWriter(w: io.Writer) -> Ref<Writer>

/// Reader is a quoted-printable decoder.
pub type Reader

/// A Writer is a quoted-printable writer that implements [io.WriteCloser].
pub struct Writer {
  pub Binary: bool,
}

impl Reader {
  /// Read reads and decodes quoted-printable data from the underlying reader.
  fn Read(self: Ref<Reader>, mut p: Slice<uint8>) -> Partial<int, error>
}

impl Writer {
  /// Close closes the [Writer], flushing any unwritten data to the underlying
  /// [io.Writer], but does not close the underlying io.Writer.
  #[allow(unused_result)]
  fn Close(self: Ref<Writer>) -> Result<(), 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.
  fn Write(self: Ref<Writer>, p: Slice<uint8>) -> Partial<int, error>
}
