diff options
Diffstat (limited to 'src/gzip.h')
-rw-r--r-- | src/gzip.h | 22 |
1 files changed, 4 insertions, 18 deletions
@@ -20,26 +20,12 @@ #ifndef OPKG_OPK_GZIP_H_ #define OPKG_OPK_GZIP_H_ -#include <stdio.h> -#include <zlib.h> +struct opkg_opk_gzip; -#define OPKG_OPK_GZIP_BUFFER_SIZE 8192 - -struct opkg_opk_gzip_state { - FILE *input_file; - unsigned char input_buffer[OPKG_OPK_GZIP_BUFFER_SIZE]; - z_stream stream; -}; - -int -opkg_opk_gzip_init_from_file(struct opkg_opk_gzip_state *state, - const char *file_name); - -int -opkg_opk_gzip_init_from_memory(struct opkg_opk_gzip_state *state, - unsigned char *input, size_t input_size); +struct opkg_opk_gzip * +opkg_opk_gzip_init(int (*read)(void *, char **, size_t *), void *user_data); int -opkg_opk_gzip_next_record(struct opkg_opk_gzip_state *state, void *record); +opkg_opk_gzip_read(struct opkg_opk_gzip *gzip, void *record); #endif /* OPKG_OPK_GZIP_H_ */ |