I have to analyse zip files to check how large the contents are in it however ZipEntry.getSize() keeps returning -1. This is according to spec if the original size is unknown but for some reason 7-zip does seem to know the actual size as it is shown if I open the zip with it.
Does anyone know how 7-zip does this? Does it simply estimate?
Maybe ZipEntry processess only local file headers, instead of central directory which is written at the end of the zip archive after compression is done, and should contain the actual file size information.