Plumped for NPY (numpy ndarray native serialization)
Ginormous monolithic ROOT dependency, just to be able to deserialize ChromaPhotonList objects.
Requirements:
ChromaPhotonList exists for transport alone, so can easily change the format to something else, eg go directly into capnproto structures, from Geant4 C++
Also consider what happens at other end, need to form numpy arrays with the data in order for easy uploading to GPU.
Non-requirements:
Random quote:
It’s extremely performant for C, because its format mimics the layout of C data structures in memory. So for C, the encoding time is zero - just dump the bytes as-is, pretty much.
Hmm, what about byte buffer reinterpretation as numpy array ? (a la MySQL-numpy).