status = H5Dwrite (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
 
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the files COPYING and Copyright.html.  COPYING can be found at the root   *
 * of the source code distribution tree; Copyright.html can be found at the  *
 * root level of an installed copy of the electronic HDF5 document set and   *
 * is linked from the top-level documents page.  It can also be found at     *
 * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
 * access to either file, you may request a copy from help@hdfgroup.org.     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* 
 *  This example illustrates how to create a compressed dataset.
 *  It is used in the HDF5 Tutorial.
 */ 
#include "hdf5.h"
#define FILE    "cmprss.h5"
#define RANK    2
#define DIM0    100
#define DIM1    20
int main () {
    hid_t    file_id, dataset_id, dataspace_id; /* identifiers */
    hid_t    plist_id; 
    size_t   nelmts;
    unsigned flags, filter_info;
    H5Z_filter_t filter_type;
    herr_t   status;
    hsize_t  dims[2];
    hsize_t  cdims[2];
    int      idx;
    int      i,j, numfilt;
    int      buf[DIM0][DIM1];
    int      rbuf [DIM0][DIM1];
    /* Uncomment these variables to use SZIP compression 
    unsigned szip_options_mask;
    unsigned szip_pixels_per_block;
    */
    /* Create a file.  */