guzba / zippy

Pure Nim implementation of deflate, zlib, gzip and zip.
MIT License
246 stars 29 forks source link

Support all in-memory operations #56

Open viega opened 1 year ago

viega commented 1 year ago

In the in-progress reworking for zip archives, one can no longer read from an arbitrary stream.

Also, while the move to memory mapped files is a great option, there can be cases where a process isn't going to have any write-access to the file system (which would include the file used for the memory map).

It would be preferable to be flexible here, but have good defaults. For instance, I'd love to have you reading from a stream I hand you, and only deflate one file at a time as I ask for them... and I would even like the option to hand you an output stream. That'd give me options to save on memory consumption as well.