All Projects → luben → Zstd Jni

luben / Zstd Jni

Licence: other
JNI binding for Zstd

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Zstd Jni

Simdcompressionandintersection
A C++ library to compress and intersect sorted lists of integers using SIMD instructions
Stars: ✭ 289 (-31.84%)
Mutual labels:  compression
Caffe
Caffe for Sparse and Low-rank Deep Neural Networks
Stars: ✭ 339 (-20.05%)
Mutual labels:  compression
Ewahboolarray
A compressed bitmap class in C++.
Stars: ✭ 381 (-10.14%)
Mutual labels:  compression
Boxing
Android multi-media selector based on MVP mode.
Stars: ✭ 3,216 (+658.49%)
Mutual labels:  compression
Simdcomp
A simple C library for compressing lists of integers using binary packing
Stars: ✭ 331 (-21.93%)
Mutual labels:  compression
Mango
mango fun framework
Stars: ✭ 343 (-19.1%)
Mutual labels:  compression
Cute headers
Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
Stars: ✭ 3,274 (+672.17%)
Mutual labels:  compression
Lizard
Lizard (formerly LZ5) is an efficient compressor with very fast decompression. It achieves compression ratio that is comparable to zip/zlib and zstd/brotli (at low and medium compression levels) at decompression speed of 1000 MB/s and faster.
Stars: ✭ 408 (-3.77%)
Mutual labels:  compression
Compress Images
Minify size your images. Image compression with extension: jpg/jpeg, svg, png, gif. NodeJs
Stars: ✭ 331 (-21.93%)
Mutual labels:  compression
Libzip
A C library for reading, creating, and modifying zip archives.
Stars: ✭ 379 (-10.61%)
Mutual labels:  compression
Compress
Collection of compression related Go packages.
Stars: ✭ 319 (-24.76%)
Mutual labels:  compression
Xz
Pure golang package for reading and writing xz-compressed files
Stars: ✭ 330 (-22.17%)
Mutual labels:  compression
Kanzi Go
Lossless data compression in Go
Stars: ✭ 361 (-14.86%)
Mutual labels:  compression
Tinify Nodejs
Node.js client for the Tinify API.
Stars: ✭ 299 (-29.48%)
Mutual labels:  compression
Zson
ZSON is a PostgreSQL extension for transparent JSONB compression
Stars: ✭ 385 (-9.2%)
Mutual labels:  compression
Crunch
Crunch is a tool for lossy PNG image file optimization. It combines selective bit depth, color type, and color palette reduction with zopfli DEFLATE compression algorithm encoding using the pngquant and zopflipng PNG optimization tools. This approach leads to a significant file size gain relative to lossless approaches at the expense of a relatively modest decrease in image quality (see example images below).
Stars: ✭ 3,074 (+625%)
Mutual labels:  compression
Divans
Building better compression together
Stars: ✭ 337 (-20.52%)
Mutual labels:  compression
Httpteleport
Transfer 10Gbps http traffic over 1Gbps networks :)
Stars: ✭ 422 (-0.47%)
Mutual labels:  compression
Zfp
Compressed numerical arrays that support high-speed random access
Stars: ✭ 384 (-9.43%)
Mutual labels:  compression
Zipfly
Writing large ZIP archives without memory inflation
Stars: ✭ 363 (-14.39%)
Mutual labels:  compression

Zstd-jni

CI codecov.io Code Quality: C Code Quality: Java Total Alerts Maven Central Javadocs

Overview

JNI bindings for Zstd native library that provides fast and high compression lossless algorithm for Android, Java and all JVM languages:

  • static compress/decompress methods

  • implementation of InputStream and OutputStream for transparent compression of data streams fully compatible with the "zstd" program.

  • minimal performance overhead

Zstd

Zstd, short for Zstandard, is a new lossless compression algorithm, which provides both good compression ratio and speed for your standard compression needs. "Standard" translates into everyday situations which neither look for highest possible ratio (which LZMA and ZPAQ cover) nor extreme speeds (which LZ4 covers).

Zstd is developed by Yann Collet and the source is available at: https://github.com/facebook/zstd

The motivation for development, the algorithm used and its properties are explained in the blog post that introduces the library: http://fastcompression.blogspot.com/2015/01/zstd-stronger-compression-algorithm.html

Status and availability

Zstd is production ready with a stable format.

Zstd-jni is tracking the release branch of Zstd (master) with compatibility support for the legacy formats (since version 0.4).

Zstd-jni version uses the base Zstd version with Zstd-jni release appended with a dash, e.g. "1.2.0-2" is the second Zstd-jni release based on Zstd version 1.2.0.

Building and dependencies

Zstd-jni uses SBT for building the libary and running the tests.

The build system depends on Scala and the tests depend on ScalaTest and ScalaCheck but the produced JAR does not have any dependencies. It also embeds the native library.

How to build:

 $ sbt compile test package

If you want to publish it to you local ivy2 repository:

 $ sbt publish-local

Binary releases

The binary releases are architecture dependent because we are embedding the native library in the provided Jar file. Currently they are built for linux-amd64, linux-i386, linux-aarch64, linux-armhf, linux-ppc64, linux-ppc64le, linux-mips64, linux-s390x, win-amd64, win-x86, aix-ppc64, darwin-x86_64 (MacOS X), darwin-aarch64, freebsd-amd64, and freebsd-i386. More builds will be available if I get access to more platforms.

You can find published releases on Maven Central.

<dependency>
    <groupId>com.github.luben</groupId>
    <artifactId>zstd-jni</artifactId>
    <version>VERSION</version>
</dependency>

sbt dependency:

libraryDependencies += "com.github.luben" % "zstd-jni" % "VERSION"

Single architecture classified jars are also published. They can be used like:

<dependency>
    <groupId>com.github.luben</groupId>
    <artifactId>zstd-jni</artifactId>
    <version>VERSION</version>
    <classifier>linux_amd64</classifier>
</dependency>

or for sbt:

libraryDependencies += "com.github.luben" % "zstd-jni" % "VERSION" classifier "linux_amd64"

Link for direct download if you don't use a dependency manager:

If there is not yet a binary release compatible with your platform look how to build it locally under the Building section.

Android support

Zstd-jni is usable in Android applications by importing the sources in Android Studio. I guess using git sub-modules will also work.

Android archive (zstd-jni.aar) is also published on maven central. You will need to add the repository in your build.gradle, e.g.:

allprojects {
    repositories {
        jcenter()
        mavenCentral()
    }
}

as it is not added by default by Android Studio. And then add dependency on the prebuilt android archive (aar):

dependencies {
    implementation "com.github.luben:zstd-jni:[email protected]"
}

For example Android app and how to declare dependencies and use zstd-jni, consult the 2nd and 3rd commit of: https://github.com/luben/ZstdAndroidExample

License

The code for these JNI bindings is licenced under 2-clause BSD license. The native Zstd library is licensed under 3-clause BSD license or GPL2. See the LICENSE file and LICENSE and COPYRIGHT in src/main/native for full copyright and conditions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].