diff options
author | Tim Kientzle <kientzle@gmail.com> | 2009-03-24 16:01:00 -0400 |
---|---|---|
committer | Tim Kientzle <kientzle@gmail.com> | 2009-03-24 16:01:00 -0400 |
commit | ff12dfa8d4260d76144a427e400c93095acf88e6 (patch) | |
tree | 4c0baf8573d8431866b5489212cbac27c969116a /libarchive/archive_read.3 | |
parent | 4139b09bf366ce5209519f6d980027259c6dc639 (diff) | |
download | libarchive-ff12dfa8d4260d76144a427e400c93095acf88e6.tar.gz |
Add archive_read_next_header2(), which populates the archive_entry
object passed into it. Make archive_read_next_header() be the obvious
wrapper that just reuses a single entry object. This has been shown
to provide a big speedup for cases where people want to generate a list
of every entry in an archive; creating a new entry is faster than cloning
an existing entry.
Thanks to: Brian Harring
SVN-Revision: 841
Diffstat (limited to 'libarchive/archive_read.3')
-rw-r--r-- | libarchive/archive_read.3 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libarchive/archive_read.3 b/libarchive/archive_read.3 index bb56ec47..d6d2c74c 100644 --- a/libarchive/archive_read.3 +++ b/libarchive/archive_read.3 @@ -51,6 +51,7 @@ .Nm archive_read_open_filename , .Nm archive_read_open_memory , .Nm archive_read_next_header , +.Nm archive_read_next_header2 , .Nm archive_read_data , .Nm archive_read_data_block , .Nm archive_read_data_skip , @@ -132,6 +133,8 @@ .Fn archive_read_open_memory "struct archive *" "void *buff" "size_t size" .Ft int .Fn archive_read_next_header "struct archive *" "struct archive_entry **" +.Ft int +.Fn archive_read_next_header2 "struct archive *" "struct archive_entry *" .Ft ssize_t .Fn archive_read_data "struct archive *" "void *buff" "size_t len" .Ft int @@ -317,6 +320,14 @@ memory containing the archive data. Read the header for the next entry and return a pointer to a .Tn struct archive_entry . +This is a convenience wrapper around +.Fn archive_read_next_header2 +that uses an internal +.Tn struct archive_entry +object. +.It Fn archive_read_next_header2 +Read the header for the next entry and populate the provided +.Tn struct archive_entry . .It Fn archive_read_data Read data associated with the header just read. Internally, this is a convenience function that calls |