How is HDF5 different from a folder with files?

后端 未结 9 2009
予麋鹿
予麋鹿 2021-01-29 22:43

I\'m working on an open source project dealing with adding metadata to folders. The provided (Python) API lets you browse and access metadata like it was just another folder. Be

9条回答
  •  梦谈多话
    2021-01-29 23:09

    I think the main advantage is portability.

    HDF5 stores information about your datasets like the size, type and endianness of integers and floating point numbers, which means you can move an hdf5 file around and read its content even if it was created on a machine with a different architecture.

    You can also attach arbitrary metadata to groups and datasets. Arguably you can also do that with files and folders if your filesystem support extended attributes.

    An hdf5 file is a single file which can sometimes be more convenient than having to zip/tar folders and files. There is also a major drawback to this: if you delete a dataset, you can't reclaim the space without creating a new file.

    Generally, HDF5 is well suited for storing large arrays of numbers, typically scientific datasets.

提交回复
热议问题