-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base64 encoding in I/O statements #330
Comments
When the need for a feature can be addressed in portable open-source libraries that are available today (or in a few years), experience shows that that's a much better solution than trying to change the language. A "standard" feature is likely to be an incomplete solution -- you'll want some means to deal with endianness, and the standard language doesn't even provide that today for unformatted I/O despite near-universal If you have a library implementation today, and it's portable and universally available, you already have the best solution. Second-best would be a pilot extension to an open-source Fortran compiler and I/O runtime library. |
The Fortran standard process must involve prototyping.
Yes, that has to be a prerequisite for any proposal. |
Another idea: if Fortran had a way to hook in user-defined readers/writers and still use the built-in Fortran syntax to open and read from files (see #331), then one could define a "Base64Writer" as a user library, and still use the |
The hook you propose seems related to Section 2.3.9 of the coroutine proposal: https://j3-fortran.org/doc/year/19/19-169.pdf (I haven't dived into the details yet, just noticed it has a similar purpose) |
Popular visualization formats like the VTK XML File Format use Base64 encoding of numerical data as text. This slightly increases the amount of storage, but proves to be more reliable when distributing data via channels that predominantly support text (e.g. the internet). Another example use case would be embedding binary data (e.g. images, other binary assets) in HTML reports generated by a Fortran program.
The idea was suggested here:
As the user "rwmsu" has stated in that thread:
Right now, available libraries for Base64 encoding include:
The text was updated successfully, but these errors were encountered: