Reputation: 7359
Is it possible to tell HDF5 that the data in an array is, say, 4 bits per array element (within a byte) or 24 bits per array element (within a 32 bit int)? If so, does this actually save any memory, or disk space, or both?
Upvotes: 1
Views: 154
Reputation: 91
Yes. Look into the documentation for Opaque or Bitfield datatypes. You might also want to look at N-bit filters.
Since you can pack your data in as you wish, then yes, you could certainly save disk space, possibly even memory, at the expense of more complicated processing. You'll have to figure out for yourself whether the savings are worth the effort.
Upvotes: 4