zlibio.h
1 #ifndef __ZLIB_IO_H_
2 #define __ZLIB_IO_H_
3
4
5
6 #define ZIO_OK 0
7 #define ZIO_EHDL ( -1 )
8 #define ZIO_EMEM ( -2 )
9 #define ZIO_EIO ( -3 )
10 #define ZIO_EARG ( -4 )
11 #define ZIO_EFMT ( -5 )
12 #define ZIO_EINV ( -6 )
13
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19
20
21 typedef struct ZIO *hZIO;
22
23
24 typedef struct ZMem
25 {
26 void *buf;
27 int avail;
28 int size;
29 } ZMem, *hZMem;
30
31
32
33 int ZIO_Compress( const char *src, const char *dst );
34
35 int ZIO_Decompress( const char *src, const char *dst );
36
37
38
39
40
41 int ZIO_Open( hZIO *h, const char *path, const char *mode );
42
43 int ZIO_Close( hZIO h );
44
45
46 int ZIO_Read( hZIO h, void *buf, int n );
47
48 int ZIO_Write( hZIO h, const void *buf, int n );
49
50
51
52 int ZMem_Load( hZMem h, const char *path, const char *mode );
53
54 int ZMem_Save( hZMem h, const char *path, const char *mode );
55
56
57 #ifdef __cplusplus
58 }
59 #endif
60
61
62 #endif