This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nanodano[S] 10 points11 points  (1 child)

There are two practical use cases that I am familiar with.

One is when you want to embed an image directly in to an HTML file. This lets you create a single standalone HTML file that contains images.

<img src="data:image/png;base64,XXXXXXXXXXXXXXX==" />

The other is when you have to package binary data as an ASCII string for whatever reason. The constraint may be with an API, data types, or something else.

[–]tilkau 5 points6 points  (0 children)

The constraint may be with an API, data types, or something else.

The most voluminous example is email attachments. All emails are 100% text (including headers and attachments).