What is a good Java library to zip/unzip files? [closed]

I looked at the default Zip library that comes with the JDK and the Apache compression libs and I am unhappy with them for 3 reasons:

  1. They are bloated and have bad API design. I have to write 50 lines of boiler plate byte array output, zip input, file out streams and close relevant streams and catch exceptions and move byte buffers on my own? Why can’t I have a simple API that looks like this Zipper.unzip(InputStream zipFile, File targetDirectory, String password = null) and Zipper.zip(File targetDirectory, String password = null) that just works?

  2. It seems zipping unzipping destroys file meta-data and password handling is broken.

  3. Also, all the libraries I tried were 2-3x slow compared to the command line zip tools I get with UNIX?

For me (2) and (3) are minor points but I really want a good tested library with a one-line interface.

9 Answers
9

Leave a Comment