Getting uncompressed size of zipfile with Rubyzip

S

Stian Haklev

This should be really easy and obvious, but I have been looking around,
at Rubyzip documentation, googling etc, and I haven't found a very
obvious answer. All I want is to get the uncompressed size of an entire
zipfile. So far I've only found how to get the uncompressed size of
individual files within the zip file. I am using unzip -Z -t zipfile.zip
with some regexp, which works, but it's not portable or nice.

Thanks a lot, and apologies if this is a really obvious question.
Stian in Jakarta
 
T

Timothy Goddard

This should be really easy and obvious, but I have been looking around,
at Rubyzip documentation, googling etc, and I haven't found a very
obvious answer. All I want is to get the uncompressed size of an entire
zipfile. So far I've only found how to get the uncompressed size of
individual files within the zip file. I am using unzip -Z -t zipfile.zip
with some regexp, which works, but it's not portable or nice.

Thanks a lot, and apologies if this is a really obvious question.
Stian in Jakarta

You could get a list of files then add up the sizes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top