gpt4 book ai didi

c++ - 删除或更新 HDF5 中的数据集?

转载 作者:搜寻专家 更新时间:2023-10-30 23:50:58 24 4
gpt4 key购买 nike

我想以编程方式更改与 HDF5 文件中的数据集关联的数据。我似乎无法找到一种方法来按名称删除数据集(允许我使用修改后的数据再次添加它)或按名称更新数据集。我正在为 HDF5 1.6.x 使用 C API,但指向任何 HDF5 API 的指针都会很有用。

最佳答案

According to the user guide :

HDF5 does not at this time provide an easy mechanism to remove a dataset from a file or to reclaim the storage space occupied by a deleted object.

如此简单的删除似乎是行不通的。但该部分继续:

Removing a dataset and reclaiming the space it used can be done with the H5Ldelete function and the h5repack utility program. With the H5Ldelete function, links to a dataset can be removed from the file structure. After all the links have been removed, the dataset becomes inaccessible to any application and is effectively removed from the file. The way to recover the space occupied by an unlinked dataset is to write all of the objects of the file into a new file. Any unlinked object is inaccessible to the application and will not be included in the new file. Writing objects to a new file can be done with a custom program or with the h5repack utility program.

关于c++ - 删除或更新 HDF5 中的数据集?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/447854/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com