ZIPFoundation icon indicating copy to clipboard operation
ZIPFoundation copied to clipboard

Allow writing of entry when full uncompressed size is not known.

Open ps2 opened this issue 2 years ago • 1 comments

Some situations require streaming compression where the full size of the input/uncompressed data is not known, such as serializing a large number of objects where loading all the objects into memory would be prohibitive.

Changes proposed in this PR

  • Allow creation of entries without specifying an uncompressedSize

I assume the progress feedback functionality will not work when passing nil for uncompressedSize. This is ok in my particular use case. I don't think reporting progress is possible when the full size of the data to be compressed is not known.

Thanks for the simple library! Allows us to move off of the aging (and full of warnings/deprecations) minizip library.

ps2 avatar May 08 '23 18:05 ps2

Let me know if there is anything I can change to make this acceptable. Thanks!

ps2 avatar Sep 25 '23 15:09 ps2