IMPORTANT NOTICE: System downtime on Wednesday, November 21, 2018
Some configuration changes in the network architecture are scheduled for Wednesday, November 21, 2018 from 9:30 AM to 12:00 PM CET (UTC + 1:00). ICARE data archive will be unavailable and all services will be impacted during this operation. We apologize for the inconvenience and thank you for your patience.

HDF compressor

Language/Format: C++
Application type(s): Data Conversion
Related project(s):


The hdfcompressor tool copies a source HDF file and compress its SDS data, using a gzip algorithm.


At this time, only the file/SDS attributes and SDS data are supported. The VData, VGroup... are ignored.

The build process supports only the UNIX/LINUX platforms


hdfcompressor infile outfile  [compression-level]
    infile  a valid and existing HDF file [REQUIRED]
    outfile path to the compressed output file [REQUIRED]
    [compression-level] gzip compression level, from 0 to 9 [OPTIONAL]. If not set, 6 is used by default


Source can be downloaded here :


Package can be browsed here :





First, set the pathes to the HDF4 library by defining the environment variables

  • HDF_INC=<HDF4-includes-directory> , where <HDF4-includes-directory> contains the HDF4 library includes : hdf.h, mfhdf.h...
  • HDF_LIBDIR=<HDF4-libraries-directory>, where <HDF4-libraries-directory> contains the HDF4 libraries : libdf.a ( or ), libmfhdf.a ( or )

If you are using the bash shell, this can be done via the export command :

> export HDF_INC=&lt;HDF4-includes-directory>
> export HDF_LIBDIR=&lt;HDF4-libraries-directory>

Of course, replace <HDF4-includes-directory> and <HDF4-libraries-directory> by the real pathes on your system.


Build the application by running

> make

If successfull, the hdfcompressor tool will be situed in the bin directory. You can also use the library contained in the lib directory


Copyright (C) 2010 Icare -

Nicolas PASCAL,

This program is a free software; you can redistribute it and/or modify it under the terms of the CeCILL Public License as published by (License version 2 or later).

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL Public License for more details.

You should have received a copy of the CeCILL Public License along with this program; if not, please contact

For any questions or concerns regarding this program, or general information about the ICARE Project, please email to


Author(s): Nicolas Pascal (ICARE)