Dedicated backend class
Opened this issue · 3 comments
gicmo commented
Currently we don't have a dedicated class representing a backend (filesystem, hdf5, etcpp). It might be nice to have such a thing for various reason:
- Query backend specific information (default file ending, name, version, support for feature xyz)
- Tweak backend specific defaults (compression level, chunk size)
- specialized open method:
Currently the only way to open a file is viaFile::open()
. If you now want to open a file with backend specific flags (compression mode and level) we could either add all these options (as generic property key-value pairs?) or we could have a specialized open method with all the backend specific options, i.e.H5Backend::open("file.hd5", <Chunksize>, <Compression>)
.
gicmo commented
Could also be used to query backend file format version, and have checks to see if a given file can be opened in what mode (read, write) or not at all. Maybe could also be used to convert files to newer versions.
achilleas-k commented
I wonder if it would be useful to convert files between backends. For instance open an HDF5 file and save everything to the filesystem.