tmullins / hdf5oct

A library for reading hdf5 files with GNU Octave
Other
9 stars 19 forks source link

How to "read string typed datasets"? #14

Open SBahre opened 6 years ago

SBahre commented 6 years ago

I was going through the Readme of this repository and found this statement in TODO.

read string typed datasets

Is reading a string dataset really an issue in HDF5? Is there any special procedure or understanding needed for that?

I am working on the HDF5 wrapper in C# using HDF.PInvoke. My wrapper can write the string dataset. I am facing the issue while reading the string dataset. I have explored many links. Even sharpHDF, another GitHub wrapper on HDF.PInvoke does not support writing and hence, reading string datatype.

What is the issue that you are facing? If you can share the issue, we may together find the solution.

stegro commented 6 years ago

Hi SBahre, HDF5 can deal with string types, and the hdf5oct package readily reads string-type attributes. However it was just not implemented, since string-typed matrices in GNU Octave are quite different from numeral matrices. And since it is a rather exotic usecase, I just have not bothered to spend time on implementing this (I don't know how to handle Octave's cell arrays in C code...). Of course, you are welcome to do it, if you would like. Note that there are forks of this repository which are more up-to-date and there is currently activity to incorporate this code into octave core.