Skip to content

Conversation

@psrok1
Copy link
Member

@psrok1 psrok1 commented Dec 19, 2025

Draft notes
It would be even better to iterate that zip on the fly, so we're not waiting until everything is ready to ship but I don't know yet how to do that 🤔

Your checklist for this pull request

  • I've read the contributing guideline.
  • I've tested my changes by building and running the project, and testing changed functionality (if applicable)
  • I've added automated tests for my change (if applicable, optional)
  • I've updated documentation to reflect my change (if applicable)

What is the current behaviour?

What is the new behaviour?

Test plan

Closing issues

closes #1092

@psrok1 psrok1 marked this pull request as draft December 19, 2025 17:28
with aes_zipf.open(self.file_name, mode="w") as fdst:
fsrc = self.open()
try:
shutil.copyfileobj(fsrc, fdst)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can lower memory footprint here I think:

if self.upload_stream is not None:
    self.upload_stream.seek(0)
    for chunk in iter(lambda: self.upload_stream.read(chunk_size), b""):
        zipf.write(chunk)
else:
    with self.open() as fsrc:
        for chunk in iter(lambda: fsrc.read(chunk_size), b""):
            zipf.write(chunk)

@yankovs
Copy link
Contributor

yankovs commented Dec 20, 2025

what do you mean by "on the fly"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Download encrypted zipped file with different password(not the default "infected")

3 participants