sig
  module Decoder :
    sig
      type result = [ `Clean of string | `Dirty of string | `Wrong_padding ]
      val is_b64 : char -> bool
      val decode : unit Parser.t -> unit Parser.t -> result Parser.t
      val inline : unit -> result Parser.t
    end
  module Encoder :
    sig
      val w_inline_encode :
        string ->
        ([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
        Encoder.partial Encoder.k0
      val w_encode :
        string ->
        ([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
        Encoder.partial Encoder.k0
    end
  module Input :
    sig
      type nonrec 'a t =
        'a RingBuffer.Committed.t = {
        mutable contents : 'a RingBuffer.t;
        mutable mark : int option;
      }
      type mark = Weak of int | Uniq of int
      val pp_with_mark : Format.formatter -> int * int * 'a t -> unit
      val pp : Format.formatter -> 'a t -> unit
      val copy : 'a t -> int -> 'a RingBuffer.t
      val prepare : 'a t -> int -> 'a RingBuffer.t
      val equal : mark -> mark -> bool
      val mark : 'a t -> mark
      val unmark : mark -> 'a t -> unit
      val forget : mark -> 'a t -> unit
      val write : 'a t -> 'a Internal_buffer.t -> int -> int -> unit
      val write_string : 'a t -> string -> int -> int -> unit
      val create_bytes : int -> Internal_buffer.st t
      val create_bigstring : int -> Internal_buffer.bs t
      val create_by : proof:'a Internal_buffer.t -> int -> 'a t
      val size : 'a t -> int
      val peek : 'a t -> 'a Internal_buffer.t -> int -> int -> unit
      val read : 'a t -> 'a Internal_buffer.t -> int -> int -> unit
      val read_space : 'a t -> ('a Internal_buffer.t * int * int) option
      val write_space : 'a t -> ('a Internal_buffer.t * int * int) option
      val transmit :
        'a t -> ('a Internal_buffer.t -> int -> int -> int) -> int
      val ravailable : 'a t -> int
      val wavailable : 'a t -> int
      val radvance : 'a t -> int -> unit
      val wadvance : 'a t -> int -> unit
      val get : 'a t -> char
      val rollback : 'a t -> 'a Internal_buffer.t -> unit
      val proof : 'a t -> 'a Internal_buffer.t
      val savailable : 'a t -> int
    end
  type Parser.err += Wrong_padding
  type 'a decoder
  type decoding =
      [ `Continue
      | `Dirty of string
      | `End of string
      | `Error of Parser.err
      | `String of string ]
  val decoder : unit Parser.t * unit Parser.t -> 'a Input.t -> 'a decoder
  val decoder_src : 'a decoder -> 'a Input.t
  val decode : 'a decoder -> decoding
  val src : 'a decoder -> string -> int -> int -> unit
end