aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-11-15 23:19:05 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-11-15 23:19:05 +0000
commit5699b8525e855a0e851725980964e8755e365f5b (patch)
treefe3d7ead1f80f5b56e44e52a651f368adf92c91d /include
parent54ac057c0016ac23b7367342f4834e33cf7d47d7 (diff)
downloadbusybox-5699b8525e855a0e851725980964e8755e365f5b.tar.gz
Move from read_gz to the pipe()+fork() method.
open_transformer(), common code for pipe+fork. Function pointer for read() no longer needed. Allow inflate to be initialised with a specified buffer size to avoid over-reading. Reset static variables in inflate_get_next_window to fix a bug where only the first file in a .zip would be be extracted.
Diffstat (limited to 'include')
-rw-r--r--include/unarchive.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/unarchive.h b/include/unarchive.h
index 9f1331338..fa7233743 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -50,9 +50,6 @@ typedef struct archive_handle_s {
/* Count the number of bytes processed */
off_t offset;
- /* Function that reads data: read or read_bz */
- ssize_t (*read)(int fd, void *buf, size_t count);
-
/* Function that skips data: read_by_char or read_by_skip */
void (*seek)(const struct archive_handle_s *archive_handle, const unsigned int amount);
@@ -83,7 +80,6 @@ extern void header_list(const file_header_t *file_header);
extern void header_verbose_list(const file_header_t *file_header);
extern void check_header_gzip(int src_fd);
-extern void check_trailer_gzip(int src_fd);
extern char get_header_ar(archive_handle_t *archive_handle);
extern char get_header_cpio(archive_handle_t *archive_handle);
@@ -103,14 +99,12 @@ extern void data_align(archive_handle_t *archive_handle, const unsigned short bo
extern void archive_copy_file(const archive_handle_t *archive_handle, const int dst_fd);
extern const llist_t *find_list_entry(const llist_t *list, const char *filename);
-extern ssize_t read_bz2(int fd, void *buf, size_t count);
-extern void BZ2_bzReadOpen(int fd, void *unused, int nUnused);
-extern void BZ2_bzReadClose(void);
-extern unsigned char uncompressStream(int src_fd, int dst_fd);
+extern int uncompressStream(int src_fd, int dst_fd);
+extern void inflate_init(unsigned int bufsize);
+extern int inflate_unzip(int in, int out);
+extern int inflate_gunzip(int in, int out);
+
+extern int open_transformer(int src_fd, int (*transformer)(int src_fd, int dst_fd));
-extern ssize_t read_gz(int fd, void *buf, size_t count);
-extern void GZ_gzReadOpen(int fd, void *unused, int nUnused);
-extern void GZ_gzReadClose(void);
-extern int inflate(int in, int out);
#endif