Question

I'm writing an Android application that need to extract 7z archives.Pressed for time,I've searching of third-party libraries or source code which can be used in my project.

At first, i find J7zip from http://sourceforge.net/projects/p7zip/files/J7Zip/ After modifying the two sample classes, it works in my project, that's exciting! but the problem was: 1. It would cause out of memory errors when extracting larger archives 2. It only support archives with Copy or LZMA codec. I'am so sad about this...

Then, i find this:"J7zip on Android - Extracting From an Archive and Listing Contents" in StackOverflow. My requirement is seriously similar to this question.As it mentioned andro7z, it contains C/C++ code from: http://sourceforge.net/projects/p7zip/files/p7zip/; I believe this's a good solution for me.

andro7z not contains "How to use" doc and I'm new about JNI, i have no idea about how to modify the andro7z to suit my project. So, anyone had implemented extracting 7z archive with andro7z? Could You share me the demo code or steps to implement this? thanks!

Was it helpful?

Solution

I have finished this project by myself,the classes under folder "jni/7z" and "src" need implemented by yourself;if you need to support encrypted archive, you should call methods in 7z.dll or modify the source code in C/CPP folder, C/CPP are 7z source code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top