These routines create filter objects (see
that encode and decode binary data using base-64 encoding.
Both functions take a
If equal to
then the default (RFC 2045) character set is used.
must point to a string with 65 unique characters.
The first 64 are used to encode the data, while the last character is used
as a pad character when the data length is not a multiple of three.
returns a new encoding filter.
For every three bytes input to the filter, four bytes from the chosen
character set will be output.
If the input length is not a multiple of three, then one or two pad
characters will be added at the end of the output, so that the output
length of the filter is always a multiple of four.
returns a new decoding filter.
Every four bytes input to the filter are decoded into up to three bytes
is non-zero, then any malformed input causes an internal error to be
generated in the filter, with
Malformed input is any input character not from the chosen character set.
In any case, the pad character is always ignored.
is zero, then any unrecognized characters are simply ignored, rather than
causing an error.
always generates strings that are accepted by
in strict mode, when created with the same character set.
The RFC 2045 character set is avilable in