MISR Toolkit  1.5.1
cskphuff.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: cskphuff.h 4932 2007-09-07 17:17:23Z bmribler $ */
15 
16  /*-----------------------------------------------------------------------------
17  * File: cskphuff.h
18  * Purpose: Header file for skipping huffman encoding information.
19  * Dependencies: should only be included from hcompi.h
20  * Invokes: none
21  * Contents: Structures & definitions for skipping huffman encoding.
22  * Structure definitions:
23  * Constant definitions:
24  *---------------------------------------------------------------------------*/
25 
26 /* avoid re-inclusion */
27 #ifndef __CSKPHUFF_H
28 #define __CSKPHUFF_H
29 
30 #if defined c_plusplus || defined __cplusplus
31 extern "C"
32 {
33 #endif /* c_plusplus || __cplusplus */
34 
35 /*
36  ** from cskphuff.c
37  */
38 
39  extern int32 HCPcskphuff_stread
40  (accrec_t * rec);
41 
42  extern int32 HCPcskphuff_stwrite
43  (accrec_t * rec);
44 
45  extern int32 HCPcskphuff_seek
46  (accrec_t * access_rec, int32 offset, int origin);
47 
48  extern int32 HCPcskphuff_inquire
49  (accrec_t * access_rec, int32 *pfile_id, uint16 *ptag, uint16 *pref,
50  int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess,
51  int16 *pspecial);
52 
53  extern int32 HCPcskphuff_read
54  (accrec_t * access_rec, int32 length, void * data);
55 
56  extern int32 HCPcskphuff_write
57  (accrec_t * access_rec, int32 length, const void * data);
58 
59  extern intn HCPcskphuff_endaccess
60  (accrec_t * access_rec);
61 
62 #if defined c_plusplus || defined __cplusplus
63 }
64 #endif /* c_plusplus || __cplusplus */
65 
66 /* The maximum source character code: */
67 #define SKPHUFF_MAX_CHAR 255
68 
69 /* One greater than the maximum source character code: */
70 #define SUCCMAX (SKPHUFF_MAX_CHAR+1)
71 
72 /* Twice the maximum source character code: */
73 #define TWICEMAX (2*SUCCMAX+1)
74 
75 /* The root node in the tree */
76 #define ROOT 0
77 
78 /* Skipping huffman [en|de]coding information */
79 typedef struct
80 {
81  intn skip_size; /* number of bytes in each element */
82  uintn **left, /* define the left and right pointer arrays */
83  **right;
84  uint8 **up; /* define the up pointer array */
85  intn skip_pos; /* current byte to read or write */
86  int32 offset; /* offset in the de-compressed array */
87 }
89 
90 #ifndef CSKPHUFF_MASTER
91 extern funclist_t cskphuff_funcs; /* functions to perform skipping huffman encoding */
92 #else
93 funclist_t cskphuff_funcs =
94 { /* functions to perform skipping huffman encoding */
102 };
103 #endif
104 
105 #endif /* __CSKPHUFF_H */
int32 HCPcskphuff_read(accrec_t *access_rec, int32 length, void *data)
void origin(double A)
int32 HCPcskphuff_stread(accrec_t *rec)
int32 HCPcskphuff_write(accrec_t *access_rec, int32 length, const void *data)
int32 HCPcskphuff_seek(accrec_t *access_rec, int32 offset, int origin)
intn HCPcskphuff_endaccess(accrec_t *access_rec)
HDFFCLIBAPI void * data
int32 HCPcskphuff_inquire(accrec_t *access_rec, int32 *pfile_id, uint16 *ptag, uint16 *pref, int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess, int16 *pspecial)
funclist_t cskphuff_funcs
int32 HCPcskphuff_stwrite(accrec_t *rec)
HDFFCLIBAPI intf * offset

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