1

I am looking for a java library which can compress files and directories.

I need the following features -compress -decompress -split archives to multiple files based on a size limit

I would really like the following features as well -encrypt archives -encrypt file names

I would prefer if the solution was a 7zip library but it's not required.

I know there is an lzma Java sdk but i'm not sure if it supports all the features above. I know it doesn't support encryption, but does it support splitting archives?

Any library supporting all the features above would be preferred.

Thanks.

Coder
  • 1,375
  • 2
  • 20
  • 45

2 Answers2

1

How about the Deflater/Inflater classes mentioned in the question "What’s a good compression library for Java?".

I know the current interfaces proposed by Java are Stream-based, not "filename"-based, but according to the following article on Java compression.

Community
  • 1
  • 1
Umesh K
  • 13,436
  • 25
  • 87
  • 129
  • Thanks for the suggestion but it doesn't seem like this supports the features i need out of the box. – Coder Feb 25 '11 at 10:59
1

TrueZip should be able to do most of what you need

mth
  • 677
  • 1
  • 7
  • 19
  • This looks promising but it's unclear from the site if it supports splitting archives out of the box. See this url. http://truezip.java.net/features.html any ideas? – Coder Feb 25 '11 at 10:52
  • I don't think it does out of the box - that's why I said "most of what you need". But I guess splitting a big zip file into multiple files by a given size limit should not be too hard to implement. – mth Feb 25 '11 at 10:59
  • fair enough. I had trouble finding the download link for the source and library, do you know where it is? – Coder Feb 25 '11 at 11:14
  • You don't happen to know about any libraries that support standard formats with all the features do you? That way i could use the format's standard tools to work with them after my app has created them for example, which would be a huge advantage. – Coder Feb 25 '11 at 11:18
  • TrueZip 6.8.2 can be downloaded [here](http://repo1.maven.org/maven2/de/schlichtherle/truezip/6.8.2/). I've not used 7.x yet. – mth Feb 25 '11 at 12:21