DECOM preSS的RAR在Android的文件文件、preSS、DECOM、Android

2023-09-05 09:30:42 作者:爷、过爷自己的生活

我想学习如何DECOM preSS在Android的一个.rar文件。 Zip文件可以很容易地DECOM pressed使用ZipStream。是否有RAR文件的任何类似的方式。

I want to learn how to decompress a .rar file in android. Zip files can be easily decompressed using ZipStream. Is there any similar way for rar files.

推荐答案

我刚刚意识到这与jUnrar从这里 https://github.com/edmund-wagner/junrar

I just realized this with jUnrar from here https://github.com/edmund-wagner/junrar

叫你的Andr​​oid src目录中创建一个新包 com.github.junrar 您应该删除com.github.junrar.vfs2,因为它有一定的相关性,你可能不会用也无妨。

Create a new package within your Android src directory called com.github.junrar You should delete com.github.junrar.vfs2 because it has some dependencies and you probably won't use it anyway.

您可能会获得有关记录器类的一些错误。你可以删除一些日志行或像我一样写一个小包装它与android.util.Log通信。我这样做,改变了包括

You will probably get some errors about the logger class. You can either remove the few logging lines or like i did write a tiny wrapper which communicates with android.util.Log. I did that and changed the includes.

如果你完成导入的code看看jUnrars testutils。 我用这个和它的工作开箱:

If you finished importing the code take a look at jUnrars testutils. I used this and it worked out of the box:

https://github.com/edmund-wagner/junrar/blob/master/testutil/src/main/java/com/github/junrar/testutil/ExtractArchive.java

希望它可以帮助