summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_util.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2004-04-28 04:41:27 +0000
committerkientzle <kientzle@FreeBSD.org>2004-04-28 04:41:27 +0000
commit4f6d19ce20f8f561fa9e1fe7261d5a9991cd68de (patch)
treebde271e0176f2528e906220fb052eacb00d57033 /lib/libarchive/archive_util.c
parentd6382fb16020a26e25981a0a7a51cb75aa79485e (diff)
downloadFreeBSD-src-4f6d19ce20f8f561fa9e1fe7261d5a9991cd68de.zip
FreeBSD-src-4f6d19ce20f8f561fa9e1fe7261d5a9991cd68de.tar.gz
Add statistics: track offset in compressed and uncompressed archive,
provide an interface for the client to query this information.
Diffstat (limited to 'lib/libarchive/archive_util.c')
-rw-r--r--lib/libarchive/archive_util.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/libarchive/archive_util.c b/lib/libarchive/archive_util.c
index 99aa136..065a8fe 100644
--- a/lib/libarchive/archive_util.c
+++ b/lib/libarchive/archive_util.c
@@ -76,6 +76,26 @@ archive_compression_name(struct archive *a)
return (a->compression_name);
}
+
+/*
+ * Return a count of the number of compressed bytes processed.
+ */
+int64_t
+archive_position_compressed(struct archive *a)
+{
+ return (a->raw_position);
+}
+
+/*
+ * Return a count of the number of uncompressed bytes processed.
+ */
+int64_t
+archive_position_uncompressed(struct archive *a)
+{
+ return (a->file_position);
+}
+
+
void
archive_set_error(struct archive *a, int error_number, const char *fmt, ...)
{
OpenPOWER on IntegriCloud