Can HDF5 be connected to formatted data?
Is it possible to write HDF5 to stdout and read from stdin (via H5::File file("/dev/stdout",H5F_ACC_RDONLY)
or otherwise)?
I want a program to foo
write to an HDF5 file (considered by its first argument, say) and another program bar
to read from an HDF5 file, and then instead of
command_prompt> foo temp.h5
command_prompt> bar temp.h5
command_prompt> rm temp.h5
just tell
command_prompt> foo - | bar -
where programs foo
and bar
understand that the special file name -
means stdout
and, stdin
respectively. To write these programs, I want to know: 1) is it possible, and 2) how I implement it, that is, what should be passed to H5Fcreate()
and H5Fopen()
, accordingly, in the case of filename = -
.
I have tried and it seems impossible (not a big surprise). HDF5 only has H5Fcreate()
, H5Fopen()
and H5Freopen()
none of which seems to support I / O before stdin/stdout
.
source to share