Class ZstdInputStreamNoFinalizer

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.github.luben.zstd.ZstdInputStreamNoFinalizer
All Implemented Interfaces:
Closeable, AutoCloseable

public class ZstdInputStreamNoFinalizer extends FilterInputStream
InputStream filter that decompresses the data provided by the underlying InputStream using Zstd compression. It does not support mark/reset methods. It also does not have finalizer, so if you rely on finalizers to clean the native memory and release buffers use `ZstdInputStream` instead.
  • Field Details

    • stream

      private final long stream
    • dstPos

      private long dstPos
    • srcPos

      private long srcPos
    • srcSize

      private long srcSize
    • needRead

      private boolean needRead
    • bufferPool

      private final BufferPool bufferPool
    • srcByteBuffer

      private final ByteBuffer srcByteBuffer
    • src

      private final byte[] src
    • srcBuffSize

      private static final int srcBuffSize
    • isContinuous

      private boolean isContinuous
    • frameFinished

      private boolean frameFinished
    • isClosed

      private boolean isClosed
  • Constructor Details

    • ZstdInputStreamNoFinalizer

      public ZstdInputStreamNoFinalizer(InputStream inStream) throws IOException
      create a new decompressing InputStream
      Parameters:
      inStream - the stream to wrap
      Throws:
      IOException
    • ZstdInputStreamNoFinalizer

      public ZstdInputStreamNoFinalizer(InputStream inStream, BufferPool bufferPool) throws IOException
      create a new decompressing InputStream
      Parameters:
      inStream - the stream to wrap
      bufferPool - the pool to fetch and return buffers
      Throws:
      IOException
  • Method Details