Skip to content

tarunk2/zstd-jni

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zstd-jni

Build Status Windows Build codecov.io Maven Central

Overview

JNI bindings for Zstd native library that provides fast and high compression lossless algorythm for 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 algotithm 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 stable format with release 1.0.0

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

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-ppc64, aix-ppc64 and max_os_x-x86_64. 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>1.0.0</version>
</dependency>

sbt dependency:

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

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 Building

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 with a patent grant. See the LICENSE and src/main/native/LICENSE for full copythight and conditions.

About

JNI binding for Zstd

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 96.7%
  • C++ 1.2%
  • Java 1.1%
  • Scala 1.0%