Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compression parameter #306

Merged
merged 1 commit into from
Oct 28, 2020
Merged

compression parameter #306

merged 1 commit into from
Oct 28, 2020

Conversation

omerbt
Copy link
Contributor

@omerbt omerbt commented Oct 28, 2020

What is the purpose of this PR?
To change the implementation increate_deepcell_output so that the generated zip file will have a smaller size.
[Bug fix (closes #301)]

How did you implement your changes

create_deepcell_outputgenerates the zip file using the zipfile module (https://docs.python.org/3/library/zipfile.html#zipfile-objects). the default value for the compression parameter in zipfile.ZipFile is zipfile.ZIP_STORED (uncompressed archive member). I changed the value to zipfile.ZIP_DEFLATED (the usual ZIP compression method).
After changing this parameter, the zip file created by the notebook is the same size as one created manually.

Copy link
Member

@ngreenwald ngreenwald left a comment

Choose a reason for hiding this comment

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

The default behavior is that there is no compression applied?!?!? Who thought that was a good idea??

@ngreenwald ngreenwald merged commit d71eb75 into master Oct 28, 2020
@ngreenwald ngreenwald deleted the zip_compression branch October 28, 2020 16:10
alex-l-kong pushed a commit that referenced this pull request Jan 14, 2021
y2kbugger pushed a commit that referenced this pull request Jul 29, 2021
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.

Zipfile for deepcell upload is very large
2 participants