Base64 (.b64) File Format
Base 64 file format
Description
Examples
Base 64 encoding is a common means of encoding binary data using a 64-character subset of 8-bit ASCII. It is intended to permit binary data to be encoded in contexts where only text data is reliably supported.
The StringTools[Encode] and StringTools[Decode] commands with encoding=base64 can encode and decode strings and ByteArrays using base 64 encoding.
The Import and Export commands can be used to read and write files in the base 64 format.
Import a binary file as a ByteArray and encode into base 64 format.
newton≔FileTools:-Binary:-ReadFile⁡FileTools:-JoinPath⁡example/newton.bz2,base=datadir
newton≔669010457496589388389101−41−114−119008−43−12801664503255−27−9732320846812−125−4708−907935−46−10410612226122−82−45−82−1269953105123−85−71−2465−11779109−59184316106−10371−61−103−11018−10333−2835−943337−737−6646−28−118112−9532−53−812918
encoded≔StringTools:-Encode⁡newton,encoding=base64
encoded≔QlpoOTFBWSZTWWXXjokAAAjVgAAQQAUAIDflnyAgAFREDIPRAAimTyPSmGp6Gnqu066CYwUDaXuruehBi09txRIrEGqZR8OZkhKZIeQjoiEltwe+LuSKcKEgy68dEg==
StringTools:-Decode⁡encoded,encoding=base64
669010457496589388389101−41−114−119008−43−12801664503255−27−9732320846812−125−4708−907935−46−10410612226122−82−45−82−1269953105123−85−71−2465−11779109−59184316106−10371−61−103−11018−10333−2835−943337−737−6646−28−118112−9532−53−812918
See Also
Formats
Download Help Document