archive_read_extract,
archive_read_extract2,
archive_read_extract_set_progress_callback —
functions for reading streaming archives
Streaming Archive Library (libarchive, -larchive)
#include
<archive.h>
int
archive_read_extract(struct archive
*, struct archive_entry *, int
flags);
int
archive_read_extract2(struct archive
*src, struct archive_entry *,
struct archive *dest);
void
archive_read_extract_set_progress_callback(struct
archive *, void (*func)(void *),
void *user_data);
Most functions return zero on success, non-zero on error. The
possible return codes include: ARCHIVE_OK (the
operation succeeded), ARCHIVE_WARN (the operation
succeeded but a non-critical error was encountered),
ARCHIVE_EOF (end-of-archive was encountered),
ARCHIVE_RETRY (the operation failed but can be
retried), and ARCHIVE_FATAL (there was a fatal
error; the archive should be closed immediately).
Detailed error codes and textual descriptions are available from
the archive_errno() and
archive_error_string() functions.