1

In my case, the zipfile is in S3 Bucket and we are trying to get the uncompressed size of it using ZipInputStream and its size as entry.getSize() which is actually returning -1.

I googled and found to use ZipFile,Enumeration and zipfile.entries() answer but how should I pass my s3 path of zip file to below.

ZipFile zipfile = new ZipFile("??????");

Any other way to get uncompressed size rightly? Please help. Thanks.

Federico klez Culloca
  • 26,308
  • 17
  • 56
  • 95
praveen
  • 63
  • 2
  • 4
  • 9
  • Is the combined size of all files in the zip is what you are expecting? – Thiyagu Mar 07 '18 at 16:47
  • I'm not sure if this can be done without actually downloading the file. If possible, you could add a custom header in the file that denotes the uncompressed size. – Thiyagu Mar 07 '18 at 17:39

0 Answers0