-
Notifications
You must be signed in to change notification settings - Fork 252
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 to set compression method? #111
Comments
There are couple of methods that accept the compression level in |
Deflater with NO_COMPRESSION not same as Store. That is in ZipOutputStream.setMethod(STORED) STORED |
I'm quite confused about the difference of levels in ZipOutputStream and Deflater. There is some information at https://stackoverflow.com/questions/1206970/how-to-create-uncompressed-zip-archive-in-java/ Based on https://en.wikipedia.org/wiki/Zip_(file_format)#Compression_methods it might even be that they use the different name (STORE vs NO_COMPRESSION) for the same thing. Are you getting any exceptions when you use NO_COMPRESSION and you actually wish to use STORED? |
I need send zips to another software and it need STORE. U can see diffrenece in size. Also U can use WinRar to see info. For store.zip - it show 1.0/Store. For no_compression.zip it show 2.0/Deflate. So it has some differences. |
Understood. Yes, there isn't a way to accomplish this. I'll give this some thought how to get there. As I understand from the JavaDoc it seems that you need to specify STORED to the outputstream AND also to each entry with setMethod(STORED). I haven't tested it though. I'll think about adding a somesort of a mapper to the pack method where users can tweak the entries. |
How to set compression Store (no compression)?
The text was updated successfully, but these errors were encountered: