-
Notifications
You must be signed in to change notification settings - Fork 93
Description
It appears that the W in ZipWriter<W> must always be Write + Seek. This means that for example, one can't write the zip to stdout.
It seems that Seek should only be required on the methods that actually make use of the functionality. As far as I understand, it should be perfectly possible to not have Seek if we're not doing anything exotic. In my use-case, I just want to add a set of files sequentially and then I'm done.
A poor work-around is to use a temporary file or a buffer and write to that, but that obviously wastes space/memory and makes the process non-streaming.
I'm not too privy to zip internals so correct me if I'm wrong. I'm pretty sure that zip program on Linux can write to stdout just by passing - as an argument. You can then send the data over the network directly without an intermediate, so presumably it's possible for the simple case.