MISR Toolkit  1.5.1
hcompi.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF. The full HDF copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /* $Id$ */
15 
16 /*-----------------------------------------------------------------------------
17  * File: hcompi.h
18  * Purpose: Internal library header file for compression information
19  * Dependencies: should be included after hdf.h
20  * Invokes:
21  * Contents:
22  * Structure definitions:
23  * Constant definitions:
24  *---------------------------------------------------------------------------*/
25 
26 /* avoid re-inclusion */
27 #ifndef __HCOMPI_H
28 #define __HCOMPI_H
29 
30 #include "hfile.h"
31 
32 /* Modeling information */
33 
34 /* structure for storing modeling information */
35 /* only allow modeling and master compression routines access */
36 
37 #include "mstdio.h" /* stdio modeling header */
38 
39 typedef struct comp_model_info_tag
40  {
41  comp_model_t model_type; /* model this stream is using */
42  union
43  { /* union of all the different types of model information */
44  comp_model_stdio_info_t stdio_info; /* stdio model info */
45  }
46  model_info;
47  funclist_t model_funcs; /* functions to perform modeling */
48  }
50 
51 /* Coding information */
52 
53 /* structure for storing modeling information */
54 /* only allow encoding and master compression routines access */
55 
56 #include "cnone.h" /* no encoding header */
57 #include "crle.h" /* run-length encoding header */
58 #include "cnbit.h" /* N-bit encoding header */
59 #include "cskphuff.h" /* Skipping huffman encoding header */
60 #include "cdeflate.h" /* gzip 'deflate' encoding header */
61 #include "cszip.h" /* szip encoding header */
62 
63 typedef struct comp_coder_info_tag
64  {
65  comp_coder_t coder_type; /* coding scheme this stream is using */
66  union
67  { /* union of all the different types of coding information */
68  comp_coder_none_info_t none_info; /* "None" coding info */
69  comp_coder_rle_info_t rle_info; /* RLE coding info */
70  comp_coder_nbit_info_t nbit_info; /* N-bit coding info */
71  comp_coder_skphuff_info_t skphuff_info; /* Skipping huffman coding info */
72  comp_coder_deflate_info_t deflate_info; /* gzip 'deflate' coding info */
73  comp_coder_szip_info_t szip_info; /* szip coding info */
74 
75  }
76  coder_info;
77  funclist_t coder_funcs; /* functions to perform encoding */
78  }
80 
81 /* structure for storing a state */
82 typedef struct comp_stateinfo_tag
83  {
84  uint32 d_offset; /* the offset of the state in the dataset */
85  uint32 c_offset; /* offset of the state in the compressed data */
86  comp_model_info_t minfo; /* modeling information */
87  comp_coder_info_t cinfo; /* coding information */
88  }
90 
91 /* structure for storing state caching information */
92 typedef struct comp_state_cache_tag
93  {
94  intn num_states; /* the number of states cached */
95  comp_stateinfo_t **comp_state; /* pointer to an array of pointers to
96  compression states */
97  }
99 
100 /* compinfo_t -- compressed element information structure */
101 typedef struct compinfo_tag
102  {
103  intn attached; /* number of access records attached
104  to this information structure */
105  int32 length; /* the actual length of the data elt */
106  uint16 comp_ref; /* compressed info ref. number */
107  int32 aid; /* AID of the compressed info */
108  comp_model_info_t minfo; /* modeling information */
109  comp_coder_info_t cinfo; /* coding information */
110  intn caching; /* whether caching is turned on */
111  comp_state_cache_t sinfo; /* state information for caching */
112  }
113 compinfo_t;
114 
115 #endif /* __HCOMPI_H */
comp_model_t
Definition: hcomp.h:31
struct comp_model_info_tag comp_model_info_t
struct comp_stateinfo_tag comp_stateinfo_t
struct comp_state_cache_tag comp_state_cache_t
comp_model_stdio_info_t stdio_info
Definition: hcompi.h:44
union comp_model_info_tag::@12 model_info
comp_coder_t
Definition: hcomp.h:38
struct comp_coder_info_tag comp_coder_info_t
struct compinfo_tag compinfo_t
funclist_t model_funcs
Definition: hcompi.h:47
comp_model_t model_type
Definition: hcompi.h:41

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52