Hi all. I'm looking for any advice on an archive l...
# android
d
Hi all. I'm looking for any advice on an archive library for Kotlin. Preferable would be something that can read zip and rar files. Any advice?
RAR is proprietary and contains a wide range of compression methods over different versions, so that will be more difficult
d
@ephemient For RAR, I'm only looking for extracting files, not compressing them.
There's a library for Java that I use on a server project to extract files from RAR archives. I'm hoping to find similar for Kotlin.
e
if you're talking about junrar, it's bound by the unrar license (as it's a port) and it is not synced up to RAR 5
d
@ephemient This one is a KMP targeting, initially, iOS and Android.
e
you can try porting unrar yourself, I do not know of any existing projects
👍 1
d
Ugh, that could take some time. 😞 I'll likely end up just dropping support for RAR files initially and just focusing on ZIP in that case.
I did just see another project on GitHub that targets Android and uses this library: me.zhanghai.android.libarchivelibrary1.1.4
The library's not written in Kotlin, but is it possible to use it from Kotlin?
The project above is written in Kotlin, though, so it must be possible.
e
it uses libarchive through JNI. you'll have to write your own bindings for native etc. if you want to use the same approach
d
Oh, ugh. Looks like RAR's out then. TY.