The software is available on GitHub, and is installed as follows.
base64.maccording to the following table, depending on the operating system you use and your preference for a user-based or a system-wide installation.
|OS||User-based installation||System-wide installation|
|Mac OS X||
~denotes the user's home directory in Mac OS X and Linux and the user's directory inside
Documents and Settingsin Windows, while
Rdenotes the Mathematica root directory.
$Pathvariable will also work.
The package is loaded as usual:
base64Decode are provided: the first one handles encoding a succession of bytes (contained in a list):
In:= ?base64Encode base64Encode[byt] returns the string base64-encoding the sequence of bytes byt In:= original=ToCharacterCode["The quick brown fox jumps over the lazy dog"]; In:= base64Encode[original] Out= VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==
base64Decode returns a list containing the decoded bits corresponding to a base64 encoded string:
In:= ?base64Decode base64Decode[str] returns the list containing the bits corresponding to the base64-decoded version of the string str In:= decodedBytes=base64Decode["VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="]; In:= FromCharacterCode[decodedBytes] Out= The quick brown fox jumps over the lazy dog
base64 is licensed uder the LGPL license.