oleg-cherednik / zip4jvm

zip files support for JDK application: split, zip64, encryption, streaming
https://github.com/oleg-cherednik/zip4jvm
Apache License 2.0
26 stars 3 forks source link

Add encryption and compression settings for all entries #79

Closed oleg-cherednik closed 5 days ago

oleg-cherednik commented 9 months ago

Usually we set one encryption and compression settings for all entires. So we should provide this settings directly in ZipSettings:

ZipSettings settings = ZipSettings.builder()
                                  .encryption(Encryption.AES_256, password)
                                  .compression(Compression.DEFLATE, CompressionLevel.NORMAL)
                                  .build();

Additionally, we should not allow set a password to ZipEntrySettings without providing encryption algorithm.