···3939(** [decoder src] is a decoder that inputs from [src]. *)
40404141val decode : decoder -> decode
4242-(** [decode d] is: {ul {- [`Await] if [d] has a [`Manual] input source and
4343- awaits for more input. The client must use {!src} to provide it.} {- [`End]
4444- if the end of input was reached} {- [`Malformed bytes] if the [bytes]
4545- sequence is malformed according to the decoded base64 encoding scheme. If
4646- you are interested in a best-effort decoding, you can still continue to
4747- decode after an error until the decode synchronizes again on valid bytes.}
4848- {- [`Flush data] if a [data] sequence value was decoded.} {-
4949- [`Wrong_padding] if decoder retrieve a wrong padding at the end of the
5050- input.}}
4242+(** [decode d] is:
51435252- {b Note}. Repeated invocation always eventually returns [`End], even in
5353- case of errors. *)
4444+ - [`Await] if [d] has a [`Manual] input source and awaits for more input.
4545+ The client must use {!src} to provide it.
4646+ - [`End] if the end of input was reached
4747+ - [`Malformed bytes] if the [bytes] sequence is malformed according to the
4848+ decoded base64 encoding scheme. If you are interested in a best-effort
4949+ decoding, you can still continue to decode after an error until the decode
5050+ synchronizes again on valid bytes.
5151+ - [`Flush data] if a [data] sequence value was decoded.
5252+ - [`Wrong_padding] if decoder retrieve a wrong padding at the end of the
5353+ input.
5454+5555+ {b Note}. Repeated invocation always eventually returns [`End], even in case
5656+ of errors. *)
54575558val decoder_byte_count : decoder -> int
5659(** [decoder_byte_count d] is the number of characters already decoded on [d]
···7982(** [encoder dst] is an encoder for Base64 (RFC2045) that outputs to [dst]. *)
80838184val encode : encoder -> encode -> [ `Ok | `Partial ]
8282-(** [encode e v]: is {ul {- [`Partial] iff [e] has a [`Manual] destination and
8383- needs more output storage. The client must use {!dst} to provide a new
8484- buffer and then call {!encode} with [`Await] until [`Ok] is returned.} {-
8585- [`Ok] when the encoder is ready to encode a new [`Char] or
8686- [`End]}}
8585+(** [encode e v]: is
8686+8787+ - [`Partial] iff [e] has a [`Manual] destination and needs more output
8888+ storage. The client must use {!dst} to provide a new buffer and then call
8989+ {!encode} with [`Await] until [`Ok] is returned.
9090+ - [`Ok] when the encoder is ready to encode a new [`Char] or [`End]
87918892 For [`Manual] destination, encoding [`End] always return [`Partial], the
8993 client should continue as usual with [`Await] until [`Ok] is returned at
9094 which point {!dst_rem} [encoder] is guaranteed to be the size of the last
9195 provided buffer (i.e. nothing was written).
92969393- {b Raises.} [Invalid_argument] if a [`Char] or [`End] is
9494- encoded after a [`Partial] encode. *)
9797+ {b Raises.} [Invalid_argument] if a [`Char] or [`End] is encoded after a
9898+ [`Partial] encode. *)
959996100val encoder_dst : encoder -> dst
97101(** [encoder_dst encoder] is [encoder]'s output destination. *)