diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-04-28 04:41:27 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-04-28 04:41:27 +0000 |
commit | 4f6d19ce20f8f561fa9e1fe7261d5a9991cd68de (patch) | |
tree | bde271e0176f2528e906220fb052eacb00d57033 /lib/libarchive/archive_write_set_compression_gzip.c | |
parent | d6382fb16020a26e25981a0a7a51cb75aa79485e (diff) | |
download | FreeBSD-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_write_set_compression_gzip.c')
-rw-r--r-- | lib/libarchive/archive_write_set_compression_gzip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libarchive/archive_write_set_compression_gzip.c b/lib/libarchive/archive_write_set_compression_gzip.c index b09fc2b..6832d97 100644 --- a/lib/libarchive/archive_write_set_compression_gzip.c +++ b/lib/libarchive/archive_write_set_compression_gzip.c @@ -200,6 +200,7 @@ archive_compressor_gzip_write(struct archive *a, const void *buff, if ((ret = drive_compressor(a, state, 0)) != ARCHIVE_OK) return (ret); + a->file_position += length; return (length); } @@ -270,6 +271,7 @@ archive_compressor_gzip_finish(struct archive *a) if (tocopy < 8) { ret = (a->client_writer)(a, a->client_data, state->compressed, state->compressed_buffer_size); + a->raw_position += ret; state->stream.next_out = state->compressed; state->stream.avail_out = state->compressed_buffer_size; memcpy(state->stream.next_out, trailer + tocopy, 8-tocopy); |