Last Updated: 17 Aug 2017 09:24 by ADMIN
Created on: 25 Apr 2016 19:36
Category: ZipLibrary
Type: Feature Request
ZipLibrary: Do not load entire ZIP archive in the memory when updating it
When updating ZIP archive, there is no need for loading it fully in the memory. Each entry is represented as a separate stream; when the ZipArchive is disposed, each entry is written in the OutputStream which is MemoryStream. When an entry is written in the OutputStream it is read from the source file if it is not changed. The MemoryStream is used because the source file is needed to get the entries contents. 

A temporary file can be used instead and there will be no need of the memory stream, so that large files will be updated without using much memory (which causes OutOfMemoryException).