Skip to main content
January 11, 2012
Question

Find unzipped file size of zip file

  • January 11, 2012
  • 1 reply
  • 1065 views

Hi,

I know ColdFusion can check the size of uploaded files. I have an interesting question. How can ColdFusion check the unzipped file size of zip file?

For example, I zip a 10MB file to 8MB. How can ColdFusion return the file size 10MB, not 8MB?

    This topic has been closed for replies.

    1 reply

    Inspiring
    January 11, 2012

    Do a list of the zip, then an arraySum() on the size column.  I don't think there's any etter way of doing it than that; the zip format doesn't seem to store that information as a single number:

    http://en.wikipedia.org/wiki/Zip_%28file_format%29#Standardization

    --

    Adam