Base 64 Encoding
Site Map Feedback

Download:

Up ASCIIHex Base32 Base64 MIME QuotedPrintable URL UU
The code presented here encodes binary data to Base64 formatted Text and Decodes Base64 formatted Text to the original binary data.
This encoding is used to convert binary files into text files so that they can be sent through e-mail systems.
The encoded data is a third larger than the original data.
Base64 format is part of the MIME protocol.

Base64.h has a class, MIME which Performs Base64 encoding and decoding of a whole File.
Any one encoded line of text will not exceed 77 characters.
Base64 produces smaller encoded files than Unix to Unix (UU).
Usage:
  MIME::Encode("C:\\T.b64"   ,"C:\\T.bmp");
  MIME::Decode("C:\\TB64.bmp","C:\\T.b64");

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


 (1371) Last modified: Fri, 15 May 2009 15:23:30 +0100