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

How can I set the compression level to 2, 4, 6 or 8 #307

Closed
jptx1234 opened this issue Apr 10, 2021 · 4 comments
Closed

How can I set the compression level to 2, 4, 6 or 8 #307

jptx1234 opened this issue Apr 10, 2021 · 4 comments

Comments

@jptx1234
Copy link

jptx1234 commented Apr 10, 2021

The CompressionLevel is an enum class. There are only levels 1, 3, 5, 7, and 9. How can I set the compression level to 2, 4, 6 or 8?

Thank you.

@jptx1234 jptx1234 changed the title How to set compression level 2、4、6、8 How can I set the compression level to 2, 4, 6 or 8 Apr 10, 2021
@srikanth-lingala
Copy link
Owner

This is unfortunately not possible at the moment. Do you need such fine grained compression levels? I can consider adding it to the enum, but just curious to know the use case you have.

@jptx1234
Copy link
Author

This is unfortunately not possible at the moment. Do you need such fine grained compression levels? I can consider adding it to the enum, but just curious to know the use case you have.

We are developing a data backup program in our system. In previous versions, we use the original zip command to backup the data and users can set the compression level to 1-9. The size of the original data may range from a few M to several T, so changes in compression levels can have a large impact on the size of archived files.
It's too hard to get the current backup progress from the original zip command. So we switched to zip4j. Then this issue appeared.

Thank you for your help. I love zip4j.

@srikanth-lingala
Copy link
Owner

Thanks for the explanation. I will add this in the next release.

@srikanth-lingala
Copy link
Owner

Feature added in v2.8.0 released today.

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

No branches or pull requests

2 participants