Closed divijvaidya closed 1 year ago
At https://github.com/luben/zstd-jni/blob/master/src/main/java/com/github/luben/zstd/ZstdBufferDecompressingStreamNoFinalizer.java#L47-L48 extractArray() ensures that the buffer.arrayOffset() != 0. However, that is not a strict requirement for ZstdBufferDecompressingStream since it works with the case [1] where ByteBuffer may have a non-zero position.
extractArray()
buffer.arrayOffset() != 0
ZstdBufferDecompressingStream
[1] https://github.com/luben/zstd-jni/blob/master/src/main/java/com/github/luben/zstd/BaseZstdBufferDecompressingStreamNoFinalizer.java#L71
At https://github.com/luben/zstd-jni/blob/master/src/main/java/com/github/luben/zstd/ZstdBufferDecompressingStreamNoFinalizer.java#L47-L48
extractArray()
ensures that thebuffer.arrayOffset() != 0
. However, that is not a strict requirement forZstdBufferDecompressingStream
since it works with the case [1] where ByteBuffer may have a non-zero position.[1] https://github.com/luben/zstd-jni/blob/master/src/main/java/com/github/luben/zstd/BaseZstdBufferDecompressingStreamNoFinalizer.java#L71