# Getting uncompressed size of zipfile with Rubyzip

**URL:** <https://www.ruby-forum.com/t/getting-uncompressed-size-of-zipfile-with-rubyzip/89846>\
**Category:** Ruby\
**Created:** [March 23, 2007, 10:33am UTC](https://www.ruby-forum.com/t/getting-uncompressed-size-of-zipfile-with-rubyzip/89846 "2007-03-23T10:33:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@stian](https://www.ruby-forum.com/u/stian)\
**Post date:** [March 23, 2007, 10:33am UTC](https://www.ruby-forum.com/t/getting-uncompressed-size-of-zipfile-with-rubyzip/89846/1 "2007-03-23T10:33:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@stian](https://www.ruby-forum.com/u/stian)\
**Post date:** [March 24, 2007, 2:11am UTC](https://www.ruby-forum.com/t/getting-uncompressed-size-of-zipfile-with-rubyzip/89846/2 "2007-03-24T02:11:09Z")

</div>

On Mar 23, 9:33 pm, Stian H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> Posted viahttp://www.ruby-forum.com/.

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