HL-HDF
hlenc.c File Reference
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include "hlhdf.h"

Functions

int main (int argc, char **argv)
 Main function.
 

Detailed Description

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2009-06-15

Encodes raw binary data in one file and an ASCII file containing header information, into an HDF5 file.

hlenc [-hdv] [-z compression] -i inputprefix -o outputfile

[-h] Prints a help text.

[-d] Prints debugging information.

[-v] Prints the version number.

[-z compression] Sets the compression level, can be in the range 0 to 9 where 0 is no compression and 9 is the highest compression.

-i inputprefix Specifies the prefix for the input files, the files that will be read are <inputprefix>.info and <inputprefix>.data.

-o outputfile Specifies the name of the HDF5 file to be generated. The file with extension .info should have the following apperance: DATATYPE: [ATTRIBUTE or DATASET] FIELDNAME: [name of the field, e.g. '/attr1'] DATASIZE: [size of the datatype in bytes] DATAFORMAT: [string representation of the datatype, e.g. int] DIMS: [the dimension of the data embraced by [], e.g. [10,10]]

The file with extension .data should contain raw binary data with native byte order.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Main function.