packed bitfields

Hi,

Currently the HDF5 FAQ says about bitfields ...
    How are these stored then? Any sort of padding or what?
    We currently do not pack them, so a 13-bit field in a 32-bit
    datatype still takes up 4 bytes of space. This is not ideal, but
    it is a fairly complicated problem to pack the bits on disk (in
    light of using bitfields in compound, array and variable-length
    datatypes mostly). Eventually we should fix this.

Is there any plan to implement packed bit fields in the near
future?

Thanks,

Steve

···

--
Steve Sullivan steves@ucar.edu 303-497-2823

FL/2, Research Applications Laboratory
National Center for Atmospheric Research
PO Box 3000
Boulder CO 80307
USA

Steve,

Hi,

Currently the HDF5 FAQ says about bitfields ...
   How are these stored then? Any sort of padding or what?
   We currently do not pack them, so a 13-bit field in a 32-bit
   datatype still takes up 4 bytes of space. This is not ideal, but
   it is a fairly complicated problem to pack the bits on disk (in
   light of using bitfields in compound, array and variable-length
   datatypes mostly). Eventually we should fix this.

Is there any plan to implement packed bit fields in the near
future?

We will update FAQ. In 1.8.* we provide the n-bit filter to pack data in the file; see
http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetNbit.

C example is available from http://www.hdfgroup.org/ftp/HDF5/examples/examples-by-api/api18-c.html See Dataset section.

Elena

···

On Sep 20, 2010, at 10:43 AM, Steve Sullivan wrote:

Thanks,

Steve

--
Steve Sullivan steves@ucar.edu 303-497-2823

FL/2, Research Applications Laboratory
National Center for Atmospheric Research
PO Box 3000
Boulder CO 80307
USA

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org