nix icon indicating copy to clipboard operation
nix copied to clipboard

Dedicated backend class

Open gicmo opened this issue 8 years ago • 3 comments

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 via File::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 avatar Apr 19 '17 09:04 gicmo

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.

gicmo avatar May 05 '17 11:05 gicmo

I wonder if it would be useful to convert files between backends. For instance open an HDF5 file and save everything to the filesystem.

achilleas-k avatar May 05 '17 11:05 achilleas-k

yes, definitely, cf #518

jgrewe avatar May 05 '17 11:05 jgrewe