Re: no chunking or deflate for scalar values in HDF5?

NOTE: The netcdf-hdf mailing list is no longer active. The list archives are made available for historical reasons.

Quincey Koziol <koziol@xxxxxxxxxxxx> writes:

> Hi Ed,
> On Jul 12, 2007, at 6:42 AM, Ed Hartnett wrote:
>> Howdy all HDF5ers!
>> I have been asked by a user whether the zlib deflate can be used on
>> scalar datasets.
>> I believe from my experiments in HDF5 that it cannot, because there
>> is no way to set the chunking for a scalar. Is this correct?
>> I don't believe this is discussed in the reference manual - am I
>> missing it?
>> The code below, for example, fails when I try to set the chunking.
>> Is this the correct conclusion, or am I missing something?
>       Interesting - not something I thought about trying, since it's
> not  very useful in general.  I suppose it could be beneficial if the
> datatype for the dataset was large enough that compression saved some
> space (although those gains would be offset by the B-tree overhead
> for indexing the chunks).
>       It is not currently supported, since a scalar dataspace
> corresponds  to a 0-dimensional "point", and chunks must have
> dimensions >=1.  If  this is critically important, I can work on the
> modifications to the  code to allow this to work, but it would require
> changes in a number  of places and I'd rather not go that direction
> right now...  :-)
>       Quincey

No, it's certainly not critically important!

I have a user who asked about it, but as long as we know that scalars
just can't be deflated, that's OK.

As you say, in practice it would not make much difference to deflate a
scalar anyway.


Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx

To unsubscribe netcdf-hdf, visit:

  • 2007 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-hdf archives: