All intrinsic types
Encode and decode real, integer, and character variables — both scalar and array — of any kind. Unlimited polymorphic variables supported too.
Pure Fortran 2003+ library for base64 encoding and decoding of intrinsic types
use befor64
call b64_init() ! initialise once
! encode a scalar real
character(len=:), allocatable :: code
call b64_encode(n=1.0_R8P, code=code)
! encode an integer array
call b64_encode(n=[12_I4P, 1_I4P], code=code)
! decode back
real(R8P) :: val
call b64_decode(code='AAAAAAAA8D8=', n=val)
b64_initmust be called at the very beginning of encode/decode operations (just once). The flagis_b64_initializedcan be checked at any time to confirm the library is ready.
Contributions are welcome — see the Contributing page.
BeFoR64 is distributed under a multi-licensing system:
| Use case | License |
|---|---|
| FOSS projects | GPL v3 |
| Closed source / commercial | BSD 2-Clause |
| Closed source / commercial | BSD 3-Clause |
| Closed source / commercial | MIT |