title: Snappy compression on Android
body: <p>I am currently using Gzip to compress attachments in Couchbase on Android. Recently bumped into Snappy, that seems to be an efficient solution, so decided to use Snappy instead of GZip.
  Snappy github - <a href="https://github.com/xerial/snappy-java" rel="nofollow">https://github.com/xerial/snappy-java</a>
  But what I am confused is how to use the Snappy library in Android. I downloaded the latest version of snappy (1.1.2.1) from <a href="http://central.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.2.1/" rel="nofollow">http://central.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.2.1/</a> and dropped it in the libs folder of the Android project. I now can reference the Snappy class methods in my Android source code, which made me think that everything was going great so far. Now when I run the app, I get the following error when I call Snappy.compress(byte[] data) - </p>
  
  <pre><code>org.xerial.snappy.SnappyError: [FAILED_TO_LOAD_NATIVE_LIBRARY] no native library is found for os.name=Linux and os.arch=aarch64
  org.xerial.snappy.SnappyLoader.findNativeLibrary(SnappyLoader.java:331)
  org.xerial.snappy.SnappyLoader.loadNativeLibrary(SnappyLoader.java:171)
  org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:152)
  org.xerial.snappy.Snappy.&lt;clinit&gt;(Snappy.java:47)
  </code></pre>
  
  <p>I created a sample java class to test Snappy, and it works great.
  So, from my understanding, its missing some native libraries for the Linux kernel, but even from the description on the github page, cannot figure out a way to build the jar file that I can use on Android. </p>
  
  <p>Any help would be greatly appreciated. 
  Thanks</p>