Skip to content

Seek bound on W in ZipWriter<W> seems overly restrictive? #32

@Fuuzetsu

Description

@Fuuzetsu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions