Top Fields Constructors Methods
com.github.luben.zstd

public Class ZstdBufferDecompressingStreamNoFinalizer

extends BaseZstdBufferDecompressingStreamNoFinalizer
Class Inheritance
Imports
com.github.luben.zstd.util.Native, java.io.IOException, java.nio.ByteBuffer

Field Summary

Inherited from com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer:
closedsourcestream

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv long
private native long
pack-priv long
decompressStream(long stream, ByteBuffer dst, int dstBufPos, int dstSize, ByteBuffer src, int srcBufPos, int srcSize)

Implements abstract com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer.decompressStream.

private native long
decompressStreamNative(long stream, byte[] dst, int dstOffset, int dstSize, byte[] src, int srcOffset, int srcSize)

pack-priv long
private native long
freeDStreamNative(long stream)

pack-priv long
private native long
initDStreamNative(long stream)

public int
read(ByteBuffer
buffer to store the read bytes from uncompressed stream.
target
)

Implements abstract com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer.read.

Reads the content of the de-compressed stream into the target buffer.
private static native long
public static int
Inherited from com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer:
closehasRemainingreadInternalrefillsetDictsetDictsetLongMax

Constructor Detail

ZstdBufferDecompressingStreamNoFinalizerback to summary
public ZstdBufferDecompressingStreamNoFinalizer(ByteBuffer source)

Method Detail

createDStreamback to summary
pack-priv long createDStream()

Implements abstract com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer.createDStream.

Annotations
@Override
createDStreamNativeback to summary
private native long createDStreamNative()
decompressStreamback to summary
pack-priv long decompressStream(long stream, ByteBuffer dst, int dstBufPos, int dstSize, ByteBuffer src, int srcBufPos, int srcSize)

Implements abstract com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer.decompressStream.

Annotations
@Override
decompressStreamNativeback to summary
private native long decompressStreamNative(long stream, byte[] dst, int dstOffset, int dstSize, byte[] src, int srcOffset, int srcSize)
freeDStreamback to summary
pack-priv long freeDStream(long stream)

Implements abstract com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer.freeDStream.

Annotations
@Override
freeDStreamNativeback to summary
private native long freeDStreamNative(long stream)
initDStreamback to summary
pack-priv long initDStream(long stream)

Implements abstract com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer.initDStream.

Annotations
@Override
initDStreamNativeback to summary
private native long initDStreamNative(long stream)
readback to summary
public int read(ByteBuffer target) throws IOException

Implements abstract com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer.read.

Doc from com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer.read.

Reads the content of the de-compressed stream into the target buffer.

This method will block until the chunk of compressed data stored in source has been decompressed and written into the target buffer. After each execution, this method will refill the source buffer, using refill(ByteBuffer).

To read the full stream of decompressed data, this method should be called in a loop while hasRemaining() is true.

The target buffer will be written starting from ByteBuffer#position(). The ByteBuffer#position() of source and the target buffers will be modified to represent the data read and written respectively.

Parameters
target:ByteBuffer

buffer to store the read bytes from uncompressed stream.

Returns:int

the number of bytes read into the target buffer.

Annotations
@Override
Exceptions
IOException:
if the stream is closed before reading.
recommendedDOutSizeNativeback to summary
private static native long recommendedDOutSizeNative()
recommendedTargetBufferSizeback to summary
public static int recommendedTargetBufferSize()