PureHDF icon indicating copy to clipboard operation
PureHDF copied to clipboard

`H5Dataset<T>` should accept `byte[]` as data input

Open Apollo3zehn opened this issue 1 year ago • 1 comments

This is a problem, i.e. H5Dataset<T> cannot handle raw data bytes:

var dataAsBytes = Encoding.Unicode.GetBytes(textEntry.Value);
var data = MemoryMarshal.Cast<byte, ushort>(dataAsBytes).ToArray();

var dataset = new H5Dataset<ushort[]>(data);

Apollo3zehn avatar Jan 02 '25 09:01 Apollo3zehn

The same applies to H5NativeWriter

Apollo3zehn avatar Jan 02 '25 10:01 Apollo3zehn