[Nexus-developers] data type for binary data

freddie.akeroyd at stfc.ac.uk freddie.akeroyd at stfc.ac.uk
Wed Dec 7 01:10:16 GMT 2011


Hi Eugen,

I think it would be good if we could use the HDF5 binary type as it properly distinguishes "UInt8" and "binary data", but we would need to add some support into NeXus to handle such data via the API and there are some compatibility issue we need to assess too. 

If we change NX_BINARY to Opaque, then a recompiled nexus program that reads a previously written binary array (UInt8) and checked its type was "NX_BINARY" would fail. Similarly a newly compiled program writing NX_BINARY to read in by an hdf5 aware non-nexus program may find that changing from UInt8 to OPAQUE breaks something there. If we think these are likely, then one option is to remove NX_BINARY and add NX_OPAQUE instead - programs using NX_BINARY would then fail to compile and must decide on UInt8 or opaque (purely relinked programs would still work though via the previous UInt8 definition). What do people think?

Regards,

Freddie
   
-----Original Message-----
From: nexus-developers-bounces at nexusformat.org [mailto:nexus-developers-bounces at nexusformat.org] On Behalf Of Eugen Wintersberger
Sent: 05 December 2011 10:15
To: nexus-developers at nexusformat.org
Subject: [Nexus-developers] data type for binary data

Hi folks
  I am actually implementing the binary field type for my C++ API. 
According to the Nexus documentation binary data is stored as UInt8 
which has historical reasons. 
HDF5 provides now an opaque data type which indicates already on HDF5
level that the data is uninterpreted binary. Thus I would rather use 
this data type than UInt8. 
Is this ok according to Nexus or shall I use UInt8 for backward
compatibility?

regards
   Eugen 

_______________________________________________
NeXus-developers mailing list
NeXus-developers at nexusformat.org
http://lists.nexusformat.org/mailman/listinfo/nexus-developers
-- 
Scanned by iCritical.



More information about the NeXus-developers mailing list