Giter Club home page Giter Club logo

Comments (2)

sethloco avatar sethloco commented on May 26, 2024

A contributor provided an android example here:
https://github.com/instantiations/es_compression/tree/master/example/android_jniLibs_generate

I only use these for dart server-side, so I can't be much help in hooking up FFI libs for Flutter

from es_compression.

kirpit avatar kirpit commented on May 26, 2024

Hi there! I just wanted to share my experience about this if I may..

I did a bit research on compression algorithms, as the project need was compression / decompression speed over file size ratio, ended up choosing LZ4. Quick search on pub.dev and here we go es_compression library; looks like well maintained, most popular among others, simple installation and use (according to docs at least). Managed to write a stream based decompression function in a day or so, finally finished it without any compile errors. When it came to test it, well... this famous error:

Failed to load dynamic library 'libeslz4-android64.so': dlopen failed: library "libeslz4-android64.so" not found

It didn't took long to end up in this thread, which directed me to lib generation example that you've given the link above. It was a relief to see the doco started with:

It's very easy to build android jni(*.so) library

which I now believe simply not true. I understand it was a quick write-up to help others but the steps were not perfectly clear as to which project to checkout, which project to make build and whatnot. Followed the steps countless times with tons of errors, version clashes, fragile and hardcoded requirements. Even the targetSdkVersion = 30 was warning as it complained about Google Play requirement min 31+ now with old Java, Gradle and Android SDK dependencies.

Finally I was able to build the .so files but then realised even the generated file names were mismatching:
isong0623/android_lib_es_compression0_9_9#1
#28

This is for Android and who knows what's waiting for iOS #41 & #45 or simply for the release build #28. Since the whole process is done in the cached dependency library, a version increase or a simple dart pub cache clean command means start over from scratch.

I understand the nature of open source and not here purely to complain, I wish I could spare some time to contribute and improve this library but I reckon there are many others like me frustrated by the fact that none of this is mentioned in the installing tab on pub.dev.

Please take this as a constructive feedback and you may want to look at the implementation of isar_flutter_libs library, which does exactly the same (architecture specific library dependencies) for Isar Database.

We've already decided to move on to gzip as I believe this is just not sustainable for a healthy development cycle and as the library generation example states at the end:

Good luck, everyone!

from es_compression.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.