Closed virtual-machinist closed 7 years ago
Hi Igor,
Thank you for your contribution. It is very much appreciated!
There is a small pause in the development right now until the next development contract starts next year. These changes will be included in the main release as soon as the development starts again and all the code and tests are validated.
I see no rationale for
Container.save(OutputStream)
being deprecated. The user should be able to freely choose where to write the contents of the container, be it FileOutputStream, ServletOutputStream or any other. Another issue I've faced while using the library was the enormous memory usage. I see no point in using byte[] intermediates for ZIP entries in AsicContainerCreator, especially when most of the underlying classes implement some sort ofwrite(OutputStream)
/getInputStream()
method. My solution was to replacewriteZipEntry()
/writeZipEntryWithoutComment()
with callbacks to the ZipOutputStream. Probably not the most elegant way of doing things, but still less memory overhead and no signature changes. My implementation uses less than 20 MB of heap for creating a container with a 1.2 GB Modern IE image (checked using VisualVM). The original implementation fails with OutOfMemoryError, if heap is not increased from default 2 GB.