Skip to content
/ BeFoR64 Public

BeFoR64, Base64 encoding/decoding library for FoRtran poor men

Notifications You must be signed in to change notification settings

szaghi/BeFoR64

Repository files navigation

BeFoR64 GitHub tag

License License License License

Status Build Status Coverage Status

BeFoR64, Base64 encoding/decoding library for FoRtran poor people

  • BeFoR64 is a pure Fortran (KISS) library for base64 encoding/decoding for modern (2003+) Fortran projects;
  • BeFoR64 is Fortran 2003+ standard compliant;
  • BeFoR64 is a Free, Open Source Project.

Table of Contents

Issues

GitHub issues Ready in backlog In Progress Open bugs

Compiler Support

Compiler Compiler Compiler Compiler Compiler Compiler

What is BeFoR64?

Modern Fortran standards (2003+) have introduced better support for strings manipulations. Exploiting such new Fortran capabilities, BeFoR64 provides an easy to use module library for encoding and decoding Fortran types (binary internal representation) in ascii-base64-encoded string.

Go to Top

Main features

  • User-friendly methods for encoding/decoding in base64:
    • encode real/integer scalar variables;
    • decode real/integer scalar variables;
    • encode real/integer array variables;
    • decode real/integer array variables;
    • encode character scalar variables;
    • decode character scalar variables;
    • encode character array variables;
    • decode character array variables;
    • encode unlimited polymorphic scalar variables;
    • decode unlimited polymorphic scalar variables;
    • encode unlimited polymorphic array variables;
    • decode unlimited polymorphic array variables;
  • user-friendly methods for packing heterogeneous data:
    • pack integer/integer (different kinds) scalars;
    • pack integer/integer (different kinds) arrays;
    • pack real/real (different kinds) scalars;
    • pack real/real (different kinds) arrays;
    • pack integer/real scalars;
    • pack integer/real arrays;
  • errors trapping mechanism.

Any feature request is welcome.

Go to Top

Copyrights

BeFoR64 is an open source project, it is distributed under a multi-licensing system:

Anyone is interest to use, to develop or to contribute to BeFoR64 is welcome, feel free to select the license that best matches your soul!

More details can be found on wiki.

Go to Top

Documentation

Besides this README file the BeFoR64 documentation is contained into its own wiki. Detailed documentation of the API is contained into the GitHub Pages that can also be created locally by means of ford tool.

A Taste of BeFoR64

Let us assume our goal is encoding a binary integer. It is as simple as

use befor64
...
character(len=:), allocatable:: code64 ! base64 encoded string
...
call b64_encode(n=12._R8P,code=code64)
print "(A)", code64

But you are not limited to a simple integer scalar, you can encode real, integer, characters scalar or arrays, and by means of the auxiliary Lib_Pack library also mixed types. See the wiki.

Go to Top