Originally Posted by
Fede
The binary file is data generated by a colleague with a pre-defined format: raw array of NormalizedPair.
It was not clear in my first post but I am actually using a std::vector<NormalizedPair>. The problem I was afraid of comes from the fact that the data was generated with an unknown version of the g++ compiler in a random OS and I am now reading the data with g++9 in Linux.
I thought alignment could become an issue even though we are using the same struct.
In the future I will have control over the generation of the data. For that case I will check SQLite. Is SQLite recommended over HDF5? The end result will be always the same, I want to consistently load the binary/SQLite/HDF5 data into an std::vector<NormalizedPair>. This is because I want to use a set of processing functions which takes as inputs C++ containers (user-defined but also std algorithms). Actually I should read more about SQLite API, maybe I can use it directly without needing a C++ container.