/usr/include/hdf/hcomp.h is in libhdf4-dev 4.2.10-3.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF. The full HDF 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 *
* http://hdfgroup.org/products/hdf4/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* $Id: hcomp.h 5830 2012-07-19 09:08:48Z bmribler $ */
/*-----------------------------------------------------------------------------
* File: hcomp.h
* Purpose: header file for compression information & structures
* Dependencies: should be included after hdf.h
* Invokes:
* Contents:
* Structure definitions: comp_info
* Constant definitions: lots...
*---------------------------------------------------------------------------*/
/* avoid re-inclusion */
#ifndef __HCOMP_H
#define __HCOMP_H
/* For determining which type of modeling is being done */
typedef enum
{
COMP_MODEL_STDIO = 0 /* for Standard C I/O model */
}
comp_model_t;
/* For determining which type of encoding is being done */
typedef enum
{
COMP_CODE_NONE = 0, /* don't encode at all, just store */
COMP_CODE_RLE, /* for simple RLE encoding */
COMP_CODE_NBIT, /* for N-bit encoding */
COMP_CODE_SKPHUFF, /* for Skipping huffman encoding */
COMP_CODE_DEFLATE, /* for gzip 'deflate' encoding */
COMP_CODE_SZIP, /* for szip encoding */
COMP_CODE_INVALID, /* invalid last code, for range checking */
COMP_CODE_JPEG, /* _Ugly_ hack to allow JPEG images to be created with GRsetcompress */
COMP_CODE_IMCOMP = 12 /* another _Ugly_ hack to allow IMCOMP images to
be inquired, 12 to be the same as COMP_IMCOMP writing
will not be allowed, however. -BMR, Jul 2012 */
}
comp_coder_t;
/* Compression types available */
#define COMP_NONE 0
#define COMP_JPEG 2
#define COMP_RLE 11
#define COMP_IMCOMP 12
/* Compression encoder/decoder configuration */
#define COMP_DECODER_ENABLED 1
#define COMP_ENCODER_ENABLED 2
#ifndef COMPRESS_MASTER
extern uint16 compress_map[];
#else
uint16 compress_map[COMP_MAX_COMP + 1] =
{ /* Mapping from compression types to tags */
0, /* No corresponding tag for un-compressed data */
0, /* (1) */
DFTAG_JPEG5, /* COMP_JPEG -> DFTAG_JPEG5 (for JPEG compression) */
0, /* (3) */
0, /* (4) */
0, /* (5) */
0, /* (6) */
0, /* (7) */
0, /* (8) */
0, /* (9) */
0, /* (10) */
DFTAG_RLE, /* COMP_RLE -> DFTAG_RLE (for Run-length compression) */
DFTAG_IMC /* COMP_IMCOMP -> DFTAG_IMC (for IMCOMP compression) */
};
#endif
typedef union tag_model_info
{ /* Union to contain modeling information */
struct
{
int32 nt; /* number type */
intn ndim; /* number of dimensions */
int32 *dims; /* array of dimensions */
}
dim;
}
model_info;
typedef union tag_comp_info
{ /* Union to contain compression information */
struct
{ /* Struct to contain information about how to compress */
/* or decompress a JPEG encoded 24-bit image */
intn quality; /* Quality factor for JPEG compression, should be from */
/* 0 (terrible) to 100 (very good) */
intn force_baseline; /* If force_baseline is set to TRUE then */
/* quantization tables are limited to */
/* 0..255 for JPEG baseline compability */
/* This is only an issue for quality */
/* settings below 24 */
}
jpeg;
struct
{ /* struct to contain information about how to compress */
/* or decompress a N-bit encoded dataset */
int32 nt; /* number type of the data to encode */
intn sign_ext; /* whether to sign extend or not */
intn fill_one; /* whether to fill with 1's or 0's */
intn start_bit; /* offset of the start bit in the data */
intn bit_len; /* number of bits to store */
}
nbit;
struct
{ /* struct to contain info about how to compress */
/* or decompress a "skipping" huffman encoded dataset */
intn skp_size; /* size of the individual elements when skipping */
}
skphuff;
struct
{ /* struct to contain info about how to compress */
/* or decompress a gzip encoded dataset */
intn level; /* how hard to work when compressing the data */
}
deflate;
struct
{
int32 options_mask; /* IN */
int32 pixels_per_block; /* IN */
int32 pixels_per_scanline; /* OUT: computed */
int32 bits_per_pixel; /* OUT: size of NT */
int32 pixels; /* OUT: size of dataset or chunk */
}
szip; /* for szip encoding */
}
comp_info;
#endif /* __HCOMP_H */
|