do not expose internal state of [g]zip unpacker.

fix memory leak in inflate_gunzip.
This commit is contained in:
Denis Vlasenko
2007-01-05 23:56:53 +00:00
parent 447b543eaf
commit cd42cb8df0
3 changed files with 51 additions and 47 deletions

View File

@@ -65,10 +65,6 @@ typedef struct archive_handle_s {
} archive_handle_t;
extern uint32_t gunzip_crc;
extern off_t gunzip_bytes_out;
extern archive_handle_t *init_handle(void);
extern char filter_accept_all(archive_handle_t *archive_handle);
@@ -106,14 +102,17 @@ extern const llist_t *find_list_entry(const llist_t *list, const char *filename)
extern const llist_t *find_list_entry2(const llist_t *list, const char *filename);
extern USE_DESKTOP(long long) int uncompressStream(int src_fd, int dst_fd);
extern void inflate_init(unsigned int bufsize);
extern void inflate_cleanup(void);
extern USE_DESKTOP(long long) int inflate_unzip(int in, int out);
typedef struct inflate_unzip_result {
off_t bytes_out;
uint32_t crc;
} inflate_unzip_result;
extern USE_DESKTOP(long long) int inflate_unzip(inflate_unzip_result *res, unsigned bufsize, int in, int out);
extern USE_DESKTOP(long long) int inflate_gunzip(int in, int out);
extern USE_DESKTOP(long long) int unlzma(int src_fd, int dst_fd);
extern int open_transformer(int src_fd,
USE_DESKTOP(long long) int (*transformer)(int src_fd, int dst_fd));
#endif