File: dictziplib.h

package info (click to toggle)
sdcv 0.3.4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,644 kB
  • ctags: 1,207
  • sloc: sh: 9,235; ansic: 7,803; cpp: 2,613; makefile: 485; yacc: 316; sed: 16
file content (61 lines) | stat: -rw-r--r-- 1,404 bytes parent folder | download | duplicates (2)
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
#ifndef __DICT_ZIP_LIB_H__
#define __DICT_ZIP_LIB_H__

#include <zlib.h>
#include <time.h>

#ifdef __cplusplus
extern "C"
{
#endif				/* __cplusplus */


#define DICT_CACHE_SIZE 5

typedef struct dictCache {
   int           chunk;
   char          *inBuffer;
   int           stamp;
   int           count;
} dictCache;

typedef struct dictData {
   int           fd;		/* file descriptor */
   const char    *start;	/* start of mmap'd area */
   const char    *end;		/* end of mmap'd area */
   unsigned long size;		/* size of mmap */
   
   int           type;
   char    *filename;
   z_stream      zStream;
   int           initialized;
   
   int           headerLength;
   int           method;
   int           flags;
   time_t        mtime;
   int           extraFlags;
   int           os;
   int           version;
   int           chunkLength;
   int           chunkCount;
   int           *chunks;
   unsigned long *offsets;	/* Sum-scan of chunks. */
   char    *origFilename;
   char    *comment;
   unsigned long crc;
   unsigned long length;
   unsigned long compressedLength;
   dictCache     cache[DICT_CACHE_SIZE];
} dictData;

dictData *dict_data_open( const char *filename, int computeCRC );
void dict_data_close( dictData *header );
void dict_data_read ( dictData *h, char *buffer, unsigned long start, unsigned long size);

#ifdef __cplusplus
}
#endif				/* __cplusplus */


#endif