MISR Toolkit  1.5.1
cszip.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 files COPYING and Copyright.html. COPYING can be found at the root *
9  * of the source code distribution tree; Copyright.html can be found at *
10  * http://hdfgroup.org/products/hdf4/doc/Copyright.html. If you do not have *
11  * access to either file, you may request a copy from help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /* $Id: cszip.h 5108 2008-10-22 18:49:22Z bmribler $ */
15 
16 /*-----------------------------------------------------------------------------
17  * File: cszip.h
18  * Purpose: Header file for szip encoding information.
19  * Dependencies: should only be included from hcompi.h
20  * Invokes: none
21  * Contents: Structures & definitions for szip encoding. This header
22  * should only be included in hcomp.c and cszip.c.
23  * Structure definitions:
24  * Constant definitions:
25  *---------------------------------------------------------------------------*/
26 
27 /* avoid re-inclusion */
28 #ifndef __CSZIP_H
29 #define __CSZIP_H
30 
31 #if defined c_plusplus || defined __cplusplus
32 extern "C"
33 {
34 #endif /* c_plusplus || __cplusplus */
35 
36 /* Special parameters for szip compression */
37 /* [These are aliases for the similar definitions in ricehdf.h header file] */
38 #define H4_SZ_ALLOW_K13_OPTION_MASK 1
39 #define H4_SZ_CHIP_OPTION_MASK 2
40 #define H4_SZ_EC_OPTION_MASK 4
41 #define H4_SZ_LSB_OPTION_MASK 8
42 #define H4_SZ_MSB_OPTION_MASK 16
43 #define H4_SZ_NN_OPTION_MASK 32
44 #define H4_SZ_RAW_OPTION_MASK 128
45 
46 /*
47  ** from cszip.c
48  */
49 
50  extern int32 HCPcszip_stread
51  (accrec_t * rec);
52 
53  extern int32 HCPcszip_stwrite
54  (accrec_t * rec);
55 
56  extern int32 HCPcszip_seek
57  (accrec_t * access_rec, int32 offset, int origin);
58 
59  extern int32 HCPcszip_inquire
60  (accrec_t * access_rec, int32 *pfile_id, uint16 *ptag,
61 uint16 *pref,
62  int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess,
63  int16 *pspecial);
64 
65  extern int32 HCPcszip_read
66  (accrec_t * access_rec, int32 length, void * data);
67 
68  extern int32 HCPcszip_write
69  (accrec_t * access_rec, int32 length, const void * data);
70 
71  extern intn HCPcszip_endaccess
72  (accrec_t * access_rec);
73 
74  extern intn HCPsetup_szip_parms
75  ( comp_info *c_info, int32 nt, int32 ncomp, int32 ndims, int32 *dims, int32 *cdims);
76 
77 #if defined c_plusplus || defined __cplusplus
78 }
79 #endif /* c_plusplus || __cplusplus */
80 
81 
82 /* SZIP [en|de]coding information */
83 typedef struct
84 {
85  int32 offset; /* offset in the file */
86  uint8 *buffer; /* buffer for storing SZIP bytes */
87  int32 buffer_pos;
88  int32 buffer_size;
90  int32 options_mask;
91  int32 pixels;
94  enum
95  {
96  SZIP_INIT, SZIP_RUN, SZIP_TERM
97  }
98  szip_state; /* state of the buffer storage */
99  enum { SZIP_CLEAN, SZIP_DIRTY } szip_dirty;
100 }
102 
103 #define SZ_H4_REV_2 0x10000 /* special bit to signal revised format */
104 
105 #ifndef CSZIP_MASTER
106 extern funclist_t cszip_funcs; /* functions to perform szip encoding */
107 #else
108 funclist_t cszip_funcs =
109 { /* functions to perform szip encoding */
117 };
118 #endif
119 
120 #endif /* __CSZIP_H */
int32 HCPcszip_seek(accrec_t *access_rec, int32 offset, int origin)
intn HCPsetup_szip_parms(comp_info *c_info, int32 nt, int32 ncomp, int32 ndims, int32 *dims, int32 *cdims)
int32 HCPcszip_stread(accrec_t *rec)
HDFFCLIBAPI void intf dims[]
int32 HCPcszip_inquire(accrec_t *access_rec, int32 *pfile_id, uint16 *ptag, uint16 *pref, int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess, int16 *pspecial)
void origin(double A)
HDFFCLIBAPI _fcd intf intf * nt
funclist_t cszip_funcs
int32 HCPcszip_read(accrec_t *access_rec, int32 length, void *data)
int32 pixels_per_scanline
Definition: cszip.h:93
int32 bits_per_pixel
Definition: cszip.h:89
intn HCPcszip_endaccess(accrec_t *access_rec)
HDFFCLIBAPI _fcd intf * ncomp
HDFFCLIBAPI void * data
int32 pixels_per_block
Definition: cszip.h:92
int32 HCPcszip_stwrite(accrec_t *rec)
HDFFCLIBAPI intf * offset
int32 HCPcszip_write(accrec_t *access_rec, int32 length, const void *data)

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