diff options
author | kientzle <kientzle@FreeBSD.org> | 2006-07-30 00:29:01 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2006-07-30 00:29:01 +0000 |
commit | f501dbec5fe3a8ec80a115b83f7f07e2671bfc95 (patch) | |
tree | 7a38c3d6e84fc5da7d1e72df478099c6b6a417f6 /lib/libarchive/archive_read_support_compression_bzip2.c | |
parent | 61dd143cfb0a5bd3bf9dc7304f3f4126ae2e5acd (diff) | |
download | FreeBSD-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_read_support_compression_bzip2.c')
-rw-r--r-- | lib/libarchive/archive_read_support_compression_bzip2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libarchive/archive_read_support_compression_bzip2.c b/lib/libarchive/archive_read_support_compression_bzip2.c index aa2d531..79742e8 100644 --- a/lib/libarchive/archive_read_support_compression_bzip2.c +++ b/lib/libarchive/archive_read_support_compression_bzip2.c @@ -187,6 +187,7 @@ init(struct archive *a, const void *buff, size_t n) a->compression_read_ahead = read_ahead; a->compression_read_consume = read_consume; + a->compression_skip = NULL; /* not supported */ a->compression_finish = finish; /* Initialize compression library. */ |