com.github.luben.zstd.BufferPool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zstd-jni Show documentation
Show all versions of zstd-jni Show documentation
JNI bindings for Zstd native library that provides fast and high compression lossless algorithm for Java and all JVM languages.
package com.github.luben.zstd;
import java.nio.ByteBuffer;
/**
* An interface that allows users to customize how buffers are recycled.
*/
public interface BufferPool {
/**
* Fetch a buffer from the pool.
* @param capacity the desired size of the buffer
* @return a heap buffer with size at least the `capacity` and arrayOffset of 0
*/
ByteBuffer get(int capacity);
/**
* Return a buffer to the pool.
* @param buffer the buffer to return
*/
void release(ByteBuffer buffer);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy