Module MrMime_base64

module MrMime_base64: sig .. end
Module Base64 encoding

module Decoder: sig .. end
module Encoder: sig .. end
module Input: module type of RingBuffer.Committed 
  with type 'a t = 'a RingBuffer.Committed.t
type Parser.err += 
| Wrong_padding
Special processing is performed if fewer than 24 bits are available at the end of the data. A full encoding quantum is always completed at the end of a body. When fewer than 24 inputs bits are available in an input group, zero bits are added (on the right) to form an integral number of 6-bit groups. Padding at the end of the data is performed using the "=" character.

Since all Base64 input is an integral number of octets, only the following cases can arise:


type 'a decoder 
The type for Base64 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
decoder (boundary, rollback) input is a Base64 decoder that inputs from input. boundary specifies the limit of the decoding and rollback allows the decoder to keep the boundary inside the input.
val decoder_src : 'a decoder -> 'a Input.t
decoder_src decoder is decoder's input source.
val decode : 'a decoder -> decoding
decode decoder is:
val src : 'a decoder -> string -> int -> int -> unit
src decoder buf off len provides decoder with len bytes to read, starting at off in buf. This byte range is read by calls to MrMime_base64.decode until `Continue is returned. To signal the end of input call the function with len = 0.