Class ZstdInputStreamNoFinalizer

  • All Implemented Interfaces:
    java.io.Closeable

    public class ZstdInputStreamNoFinalizer
    extends java.io.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.
    • Constructor Detail

      • ZstdInputStreamNoFinalizer

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

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

      • recommendedDInSize

        public static long recommendedDInSize()
      • recommendedDOutSize

        public static long recommendedDOutSize()
      • setContinuous

        public ZstdInputStreamNoFinalizer setContinuous​(boolean b)
        Don't break on unfinished frames Use case: decompressing files that are not yet finished writing and compressing
      • getContinuous

        public boolean getContinuous()
      • read

        public int read​(byte[] dst,
                        int offset,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • available

        public int available()
                      throws java.io.IOException
        Overrides:
        available in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • markSupported

        public boolean markSupported()
        Overrides:
        markSupported in class java.io.FilterInputStream
      • skip

        public long skip​(long numBytes)
                  throws java.io.IOException
        Overrides:
        skip in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.FilterInputStream
        Throws:
        java.io.IOException