Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

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



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.

Thanks!

Ed
-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx

===============================================================================
To unsubscribe netcdf-hdf, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690