Today at the ISMRM Workshop on Data Sampling & Image Reconstruction I will present the RA format, a new binary file format designed for fast, flexible data storage.

RA is a simple file format for storing n-dimensional arrays. RA stands for raw array and should be pronounced arr-ay, although it is not a coincidence that the mispronunciation rah (as in “raw” in some dialects) also makes sense.

RA was designed to be portable, fast, and storage efficient. For scientific applications in particular, it can allow the simple storage of large arrays without a separate header file to store the dimensions and type metadata.

I believe the world doesn’t need another hierarchical data container. We already have one of those—it’s called a filesystem. What is needed is a simple one-to-one mapping of data structures to disk files that preserves metadata and is fast and simple to read and write.

In addition to int, uint, and float of arbitrary sizes, RA also supports

(1) complex floats: which other common formats, such as HDF5, don’t have.

(2) composite types: RA handles reading and writing these, but the encoding and decoding of those is left to the user, since only they can know the structure of their struct. Decoding can be as simple as a typecast, however, for types of fixed size.

As an aside, the RA format is technically recursive (or fractal?!). You could store an array of RA files in a RA file if you want by defining the file as a composite type.

For details about the format and to download the code, head over to the RA git repository. The README contains details about the implementation, how to install it, and how to use it.

For help, file an issue on the bug tracker or email one of the authors. Third party help is welcome and can be contributed through pull requests.

Enjoy!