I am developing a generic package implementing a parallel algorithm and I want to provide generic IO routines for user types. I know that JLD2 may have breakage between Julia releases because the serialization of types is not guaranteed to be backwards-compatible. However, I would like to guarantee that if a user’s types are raw arrays then they will be able to read back in the stored data. Does JLD2 guarantee this? I can always allow a method for data storage that provides a custom serialization function to convert a user type to a raw array and then use JLD2 as backend to write that array.
AFAIK JLD2 does not uses Julia’s serialization, but a subset of HDF5, so it should be OK.
If by “raw arrays”, you mean commonly used primitive bitstypes like defined in Base
like Int32
and Float64
, you should be fine.
Yeah, that’s what I was getting at. How does JLD2 serialize arbitrary Julia types using only the HDF5 standard?
AFAIK it has its own format, but takes advantage of HDF5 features when it can.