java.lang.Object
org.elasticsearch.nativeaccess.Zstd
-
Method Summary
Modifier and TypeMethodDescriptionintcompress(CloseableByteBuffer dst, CloseableByteBuffer src, int level) Compress the content ofsrcintodstat compression levellevel, and return the number of compressed bytes.intcompressBound(int srcLen) Return the maximum number of compressed bytes given an input length.intdecompress(CloseableByteBuffer dst, ByteBuffer src) Variant ofdecompress(CloseableByteBuffer, CloseableByteBuffer)that accepts a directByteBufferas the source.intdecompress(CloseableByteBuffer dst, CloseableByteBuffer src) Decompress the content ofsrcintodst, and return the number of decompressed bytes.
-
Method Details
-
compress
Compress the content ofsrcintodstat compression levellevel, and return the number of compressed bytes.Buffer.position()andBuffer.limit()of bothByteBuffers are left unmodified. -
decompress
Decompress the content ofsrcintodst, and return the number of decompressed bytes.Buffer.position()andBuffer.limit()of bothByteBuffers are left unmodified. -
decompress
Variant ofdecompress(CloseableByteBuffer, CloseableByteBuffer)that accepts a directByteBufferas the source. Use this when the caller already holds a direct buffer (e.g. fromDirectAccessInput.withByteBufferSlice) to avoid allocating an intermediateCloseableByteBuffer. -
compressBound
public int compressBound(int srcLen) Return the maximum number of compressed bytes given an input length.
-