changes by PB to use it for embedding images in html
0->"A" //not "="
63->"/" //not "-"
replace trailing fillers with "="

now You can do:

raw = BinaryReadList[fn];
base64 = base64Encode[raw];
"<html><head></head><body><img src='data:image/" <> ext <> ";base64,\n" <> base64 <> "'></body></html>";

will show embedded image

specs for changes taken from wikipedia
http://de.wikipedia.org/wiki/Base64