diff options
author | Timo Teras <timo.teras@iki.fi> | 2008-11-07 17:11:08 +0200 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2008-11-07 17:11:08 +0200 |
commit | aef0f036f08f8949e4e2a5b84c9199ef8ec40595 (patch) | |
tree | 423ba9a4e5db4b8b38b6ccf2578c8c205ff7db4d /src/apk_archive.h | |
parent | 6967c28b96784d474e6c2f50b075895d89f9ce02 (diff) | |
download | apk-tools-aef0f036f08f8949e4e2a5b84c9199ef8ec40595.tar.gz apk-tools-aef0f036f08f8949e4e2a5b84c9199ef8ec40595.tar.bz2 apk-tools-aef0f036f08f8949e4e2a5b84c9199ef8ec40595.tar.xz apk-tools-aef0f036f08f8949e4e2a5b84c9199ef8ec40595.zip |
use zlib internally to decompress
Diffstat (limited to 'src/apk_archive.h')
-rw-r--r-- | src/apk_archive.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/apk_archive.h b/src/apk_archive.h index 2e8d274..b51aee5 100644 --- a/src/apk_archive.h +++ b/src/apk_archive.h @@ -13,8 +13,8 @@ #define APK_ARCHIVE #include <sys/types.h> -#include <pthread.h> #include "apk_blob.h" +#include "apk_io.h" struct apk_archive_entry { char *name; @@ -27,16 +27,19 @@ struct apk_archive_entry { mode_t mode; time_t mtime; dev_t device; - int read_fd; }; -typedef int (*apk_archive_entry_parser)(struct apk_archive_entry *entry, void *ctx); +typedef int (*apk_archive_entry_parser)(void *ctx, + const struct apk_archive_entry *ae, + struct apk_istream *istream); -pid_t apk_open_gz(int *fd); -int apk_parse_tar(int fd, apk_archive_entry_parser parser, void *ctx); -int apk_parse_tar_gz(int fd, apk_archive_entry_parser parser, void *ctx); -apk_blob_t apk_archive_entry_read(struct apk_archive_entry *ae); -int apk_archive_entry_extract(struct apk_archive_entry *ae, const char *to); -pthread_t apk_checksum_and_tee(int *fd, void *ptr); +struct apk_istream *apk_gunzip_bstream(struct apk_bstream *); + +int apk_parse_tar(struct apk_istream *, apk_archive_entry_parser parser, void *ctx); +int apk_parse_tar_gz(struct apk_bstream *, apk_archive_entry_parser parser, void *ctx); + +int apk_archive_entry_extract(const struct apk_archive_entry *ae, + struct apk_istream *is, + const char *to); #endif |