MISR Toolkit  1.5.1
cdeflate.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: cdeflate.h
18  * Purpose: Header file for gzip 'deflate' encoding information.
19  * Dependencies: should only be included from hcompi.h
20  * Invokes: none
21  * Contents: Structures & definitions for gzip 'deflate' encoding.
22  * Structure definitions:
23  * Constant definitions:
24  *---------------------------------------------------------------------------*/
25 
26 /* avoid re-inclusion */
27 #ifndef __CDEFLATE_H
28 #define __CDEFLATE_H
29 
30 /* Get the gzip 'deflate' header */
31 #define intf zintf
32 #include "zlib.h"
33 #undef zintf
34 
35 #if defined c_plusplus || defined __cplusplus
36 extern "C"
37 {
38 #endif /* c_plusplus || __cplusplus */
39 
40 /*
41  ** from cdeflate.c
42  */
43 
44  extern int32 HCPcdeflate_stread
45  (accrec_t * rec);
46 
47  extern int32 HCPcdeflate_stwrite
48  (accrec_t * rec);
49 
50  extern int32 HCPcdeflate_seek
51  (accrec_t * access_rec, int32 offset, int origin);
52 
53  extern int32 HCPcdeflate_inquire
54  (accrec_t * access_rec, int32 *pfile_id, uint16 *ptag, uint16 *pref,
55  int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess,
56  int16 *pspecial);
57 
58  extern int32 HCPcdeflate_read
59  (accrec_t * access_rec, int32 length, void * data);
60 
61  extern int32 HCPcdeflate_write
62  (accrec_t * access_rec, int32 length, const void * data);
63 
64  extern intn HCPcdeflate_endaccess
65  (accrec_t * access_rec);
66 
67 #if defined c_plusplus || defined __cplusplus
68 }
69 #endif /* c_plusplus || __cplusplus */
70 
71 /* Define the [default] size of the buffer to interact with the file. */
72 #define DEFLATE_BUF_SIZE 4096
73 #define DEFLATE_TMP_BUF_SIZE 16384
74 
75 /* gzip [en|de]coding information */
76 typedef struct
77 {
78  intn deflate_level; /* how hard to try to compress this data */
79  int32 offset; /* offset in the de-compressed array */
80  intn acc_init; /* is access mode initialized? */
81  int16 acc_mode; /* access mode desired */
82  void * io_buf; /* buffer for I/O with the file */
83  z_stream deflate_context; /* pointer to the deflation context for each byte in the element */
84 }
86 
87 #ifndef CDEFLATE_MASTER
88 extern funclist_t cdeflate_funcs; /* functions to perform gzip encoding */
89 #else
90 funclist_t cdeflate_funcs =
91 { /* functions to perform gzip encoding */
99 };
100 #endif
101 
102 #endif /* __CDEFLATE_H */
103 
funclist_t cdeflate_funcs
int32 HCPcdeflate_write(accrec_t *access_rec, int32 length, const void *data)
int32 HCPcdeflate_inquire(accrec_t *access_rec, int32 *pfile_id, uint16 *ptag, uint16 *pref, int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess, int16 *pspecial)
intn HCPcdeflate_endaccess(accrec_t *access_rec)
void origin(double A)
int32 HCPcdeflate_stwrite(accrec_t *rec)
HDFFCLIBAPI intf * acc_mode
HDFFCLIBAPI void * data
int32 HCPcdeflate_stread(accrec_t *rec)
int32 HCPcdeflate_read(accrec_t *access_rec, int32 length, void *data)
int32 HCPcdeflate_seek(accrec_t *access_rec, int32 offset, int origin)
HDFFCLIBAPI intf * offset

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