Amit Amit - 2 years ago 108
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download