# phpman > info > MIME::Decoder::Base64

[MIME::Decoder::Base64](https://www.chedong.com/phpMan.php/perldoc/MIME%3A%3ADecoder%3A%3ABase64/markdown)(User Contributed Perl [DocumentMIME::Decoder](https://www.chedong.com/phpMan.php/perldoc/DocumentMIME%3A%3ADecoder/markdown)::[Base64(3pm)](https://www.chedong.com/phpMan.php/man/Base64/3pm/markdown)

NAME
       [MIME::Decoder::Base64](https://www.chedong.com/phpMan.php/perldoc/MIME%3A%3ADecoder%3A%3ABase64/markdown) - encode/decode a "base64" stream

SYNOPSIS
       A generic decoder object; see [MIME::Decoder](https://www.chedong.com/phpMan.php/perldoc/MIME%3A%3ADecoder/markdown) for usage.

DESCRIPTION
       A [MIME::Decoder](https://www.chedong.com/phpMan.php/perldoc/MIME%3A%3ADecoder/markdown) subclass for the "base64" encoding.  The name was
       chosen to jibe with the pre-existing [MIME::Base64](https://www.chedong.com/phpMan.php/perldoc/MIME%3A%3ABase64/markdown) utility package,
       which this class actually uses to translate each chunk.

       o   When decoding, the input is read one line at a time.  The input
           accumulates in an internal buffer, which is decoded in
           multiple-of-4-sized chunks (plus a possible "leftover" input chunk,
           of course).

       o   When encoding, the input is read 45 bytes at a time: this ensures
           that the output lines are not too long.   We chose 45 since it is a
           multiple of 3 and produces lines under 76 characters, as RFC 2045
           specifies:
               The encoded output stream must be represented in lines of no
           more
               than 76 characters each.

SEE ALSO
       [MIME::Decoder](https://www.chedong.com/phpMan.php/perldoc/MIME%3A%3ADecoder/markdown)

AUTHOR
       Eryq (<eryq@zeegee.com>), ZeeGee Software Inc (<http://www.zeegee.com>).

       All rights reserved.  This program is free software; you can
       redistribute it and/or modify it under the same terms as Perl itself.

perl v5.26.1                      2017-10-20        [MIME::Decoder](https://www.chedong.com/phpMan.php/perldoc/MIME%3A%3ADecoder/markdown)::[Base64(3pm)](https://www.chedong.com/phpMan.php/man/Base64/3pm/markdown)
