All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.luben.zstd.Objects Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.5.6-8
Show newest version
package com.github.luben.zstd;

final class Objects {

    /**
     * Checks constraints, that the fromIndex, size, length is not negative, and fromIndex + size is not greater than the size. 
     */
    static void checkFromIndexSize(int fromIndex, int size, int length) {
        if ((length | fromIndex | size) < 0 || size > length - fromIndex) {
            throw new IndexOutOfBoundsException(String.format("Range [%s, %