1 /* mz_strm_libcomp.h -- Stream for apple compression
2    Version 2.8.1, December 1, 2018
3    part of the MiniZip project
4 
5    Copyright (C) 2010-2018 Nathan Moinvaziri
6       https://github.com/nmoinvaz/minizip
7 
8    This program is distributed under the terms of the same license as zlib.
9    See the accompanying LICENSE file for the full text of the license.
10 */
11 
12 #ifndef MZ_STREAM_LIBCOMP_H
13 #define MZ_STREAM_LIBCOMP_H
14 
15 #include <stdint.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 /***************************************************************************/
22 
23 int32_t mz_stream_libcomp_open(void *stream, const char *filename, int32_t mode);
24 int32_t mz_stream_libcomp_is_open(void *stream);
25 int32_t mz_stream_libcomp_read(void *stream, void *buf, int32_t size);
26 int32_t mz_stream_libcomp_write(void *stream, const void *buf, int32_t size);
27 int64_t mz_stream_libcomp_tell(void *stream);
28 int32_t mz_stream_libcomp_seek(void *stream, int64_t offset, int32_t origin);
29 int32_t mz_stream_libcomp_close(void *stream);
30 int32_t mz_stream_libcomp_error(void *stream);
31 
32 int32_t mz_stream_libcomp_get_prop_int64(void *stream, int32_t prop, int64_t *value);
33 int32_t mz_stream_libcomp_set_prop_int64(void *stream, int32_t prop, int64_t value);
34 
35 void*   mz_stream_libcomp_create(void **stream);
36 void    mz_stream_libcomp_delete(void **stream);
37 
38 void*   mz_stream_libcomp_get_interface(void);
39 void*   mz_stream_libcomp_get_crc32_update(void);
40 
41 /***************************************************************************/
42 
43 int32_t mz_stream_zlib_open(void *stream, const char *filename, int32_t mode);
44 int32_t mz_stream_zlib_is_open(void *stream);
45 int32_t mz_stream_zlib_read(void *stream, void *buf, int32_t size);
46 int32_t mz_stream_zlib_write(void *stream, const void *buf, int32_t size);
47 int64_t mz_stream_zlib_tell(void *stream);
48 int32_t mz_stream_zlib_seek(void *stream, int64_t offset, int32_t origin);
49 int32_t mz_stream_zlib_close(void *stream);
50 int32_t mz_stream_zlib_error(void *stream);
51 
52 int32_t mz_stream_zlib_get_prop_int64(void *stream, int32_t prop, int64_t *value);
53 int32_t mz_stream_zlib_set_prop_int64(void *stream, int32_t prop, int64_t value);
54 
55 void*   mz_stream_zlib_create(void **stream);
56 void    mz_stream_zlib_delete(void **stream);
57 
58 void*   mz_stream_zlib_get_interface(void);
59 void*   mz_stream_zlib_get_crc32_update(void);
60 
61 /***************************************************************************/
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif
68