forked from popacai/seekgzip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
seekgzip.h
58 lines (46 loc) · 803 Bytes
/
seekgzip.h
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
#ifndef __SEEKGZIP_H__
#define __SEEKGZIP_H__
struct tag_seekgzip; typedef struct tag_seekgzip seekgzip_t;
enum {
SEEKGZIP_SUCCESS=0,
SEEKGZIP_ERROR=-1024,
SEEKGZIP_OPENERROR,
SEEKGZIP_EXPIREDINDEX,
SEEKGZIP_READERROR,
SEEKGZIP_WRITEERROR,
SEEKGZIP_DATAERROR,
SEEKGZIP_OUTOFMEMORY,
SEEKGZIP_IMCOMPATIBLE,
SEEKGZIP_ZLIBERROR,
};
seekgzip_t*
seekgzip_open(
const char *filename,
int flags
);
void
seekgzip_close(
seekgzip_t* zs
);
void
seekgzip_seek(
seekgzip_t *zs,
off_t offset
);
off_t
seekgzip_tell(
seekgzip_t *zs
);
int
seekgzip_read(
seekgzip_t* zs,
void *buffer,
int size
);
int
seekgzip_error(
seekgzip_t* sgz
);
off_t seekgzip_unpacked_length(seekgzip_t *sz);
off_t seekgzip_packed_length(seekgzip_t *sz);
#endif/*__SEEKGZIP_H__*/