[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 20050427: Is there a way to read data "raw" and skip the swap calls



Greg,

> I was under the impression that hdf5 data was "reader makes right" where
> the data is swapped on read only if necessary.  Is the XDR order
> specific just to netcdf-4's usage, or is that how it is for all hdf5
> files? 

Using XDR order for external data is the way we're currently doing it
in netCDF-4.  One reason we did this was to simplify comparing the
same data written on different platforms.

HDF5 is very flexible in terms of format.  With HDF5, the writer can
choose a non-native representation to favor known readers.  But if the
writer uses native representation, that implements "reader makes right".

It would be a fairly simple change for us to have netcdf-4 write using
native representations instead of XDR.  Our current choice is better
in the case of data written once by a little-endian platform and read
many times by big-endian platforms, but that may be less common than
the other combinations where "reader makes right" wins.

--Russ