Amit Amit - 6 months ago 31
Java Question

Does ZipInputStream in JAVA refers to data in compressed data?

I am working on small module where I want to read the data from ZIP file using streaming. ZIP size is large and I want to keep

reference in memory for longer duration.

So I have two basic questions:

  1. Does
    holds whole ZIP data in memory?

  2. Is data referred by
    in compressed format?


ZipInputStream do not work with .zip files. You should use ZipFile instead.

ZipInputStream doesn't hold all content in memory. It process data on the fly.