https://github.com/zhanghai/libarchive-android
libarchive as an Android library
https://github.com/zhanghai/libarchive-android
Last synced: 3 months ago
JSON representation
libarchive as an Android library
- Host: GitHub
- URL: https://github.com/zhanghai/libarchive-android
- Owner: zhanghai
- License: apache-2.0
- Created: 2023-09-10T05:44:25.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-16T08:05:34.000Z (almost 2 years ago)
- Last Synced: 2024-09-17T09:52:06.213Z (almost 2 years ago)
- Language: C
- Size: 164 KB
- Stars: 53
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# libarchive-android
[](https://github.com/zhanghai/libarchive-android/actions)
[libarchive](https://github.com/libarchive/libarchive) built with Android NDK, packaged as an
Android library with some Java binding.
The bundled [libarchive](https://github.com/libarchive/libarchive) is built with
[libz](https://developer.android.com/ndk/guides/stable_apis#zlib_compression),
[libbz2](https://gitlab.com/bzip2/bzip2), [liblzma](https://github.com/tukaani-project/xz),
[liblz4](https://github.com/lz4/lz4), [libzstd](https://github.com/facebook/zstd) and
[libmbedcrypto](https://github.com/Mbed-TLS/mbedtls).
This is not an officially supported Google product.
## Integration
Gradle:
```gradle
implementation 'me.zhanghai.android.libarchive:library:1.1.6'
```
## Usage
See [`Archive.java`](library/src/main/java/me/zhanghai/android/libarchive/Archive.java) and
[`ArchiveEntry.java`](library/src/main/java/me/zhanghai/android/libarchive/ArchiveEntry.java), which
contain the Java bindings for
[`archive.h`](https://github.com/libarchive/libarchive/blob/master/libarchive/archive.h) and
[`archive_entry.h`](https://github.com/libarchive/libarchive/blob/master/libarchive/archive_entry.h)
.
See also
[`MainActivity.java`](sample/src/main/java/me/zhanghai/android/libarchive/sample/MainActivity.java)
for an example on how to use this library to read archive files.