summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_private.h
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2006-07-30 00:29:01 +0000
committerkientzle <kientzle@FreeBSD.org>2006-07-30 00:29:01 +0000
commitf501dbec5fe3a8ec80a115b83f7f07e2671bfc95 (patch)
tree7a38c3d6e84fc5da7d1e72df478099c6b6a417f6 /lib/libarchive/archive_private.h
parent61dd143cfb0a5bd3bf9dc7304f3f4126ae2e5acd (diff)
downloadFreeBSD-src-f501dbec5fe3a8ec80a115b83f7f07e2671bfc95.zip
FreeBSD-src-f501dbec5fe3a8ec80a115b83f7f07e2671bfc95.tar.gz
Use 'skip' when ignoring data in tar archives. This dramatically
increases performance when extracting a single entry from a large uncompressed archive, especially on slow devices such as USB hard drives. Requires a number of changes: * New archive_read_open2() supports a 'skip' client function * Old archive_read_open() is implemented as a wrapper now, to continue supporting the old API/ABI. * _read_open_fd and _read_open_file sprout new 'skip' functions. * compression layer gets a new 'skip' operation. * compression_none passes skip requests through to client. * compression_{gzip,bzip2,compress} simply ignore skip requests. Thanks to: Benjamin Lutz, who designed and implemented the whole thing. I'm just committing it. ;-) TODO: Need to update the documentation a little bit.
Diffstat (limited to 'lib/libarchive/archive_private.h')
-rw-r--r--lib/libarchive/archive_private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libarchive/archive_private.h b/lib/libarchive/archive_private.h
index 6b93820..419e0f7 100644
--- a/lib/libarchive/archive_private.h
+++ b/lib/libarchive/archive_private.h
@@ -68,6 +68,7 @@ struct archive {
/* Callbacks to open/read/write/close archive stream. */
archive_open_callback *client_opener;
archive_read_callback *client_reader;
+ archive_skip_callback *client_skipper;
archive_write_callback *client_writer;
archive_close_callback *client_closer;
void *client_data;
@@ -132,6 +133,7 @@ struct archive {
ssize_t (*compression_read_ahead)(struct archive *,
const void **, size_t request);
ssize_t (*compression_read_consume)(struct archive *, size_t);
+ ssize_t (*compression_skip)(struct archive *, size_t);
/*
* Format detection is mostly the same as compression
OpenPOWER on IntegriCloud