summaryrefslogtreecommitdiffstats
path: root/src/gzip.h
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-04-13 10:48:12 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-04-14 14:33:37 (EDT)
commit8ff8f191845a76aca15ce1f1bdbf1d28087d2bc5 (patch)
treee71d16b44875c97626bcf181baa5fb0887be4e72 /src/gzip.h
parent6c5ea040feeab83ad27f58b5c5c5edb699fa545e (diff)
gzip: Rewrite
Diffstat (limited to 'src/gzip.h')
-rw-r--r--src/gzip.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/gzip.h b/src/gzip.h
index bdab8f2..409de51 100644
--- a/src/gzip.h
+++ b/src/gzip.h
@@ -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_ */