Class ZstdDictDecompress

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class ZstdDictDecompress
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ZstdDictDecompress​(byte[] dict)
      Convenience constructor to create a new dictionary for use with fast decompress
      ZstdDictDecompress​(byte[] dict, int offset, int length)
      Create a new dictionary for use with fast decompress
      ZstdDictDecompress​(java.nio.ByteBuffer dict)
      Create a new dictionary for use with fast decompress.
      ZstdDictDecompress​(java.nio.ByteBuffer dict, boolean byReference)
      Create a new dictionary for use with fast decompress.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      protected void finalize()  
      java.nio.ByteBuffer getByReferenceBuffer()
      Get the byte buffer that backs this dict, if any, or null if not backed by a byte buffer.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ZstdDictDecompress

        public ZstdDictDecompress​(byte[] dict)
        Convenience constructor to create a new dictionary for use with fast decompress
        Parameters:
        dict - buffer containing dictionary to load/parse with exact length
      • ZstdDictDecompress

        public ZstdDictDecompress​(byte[] dict,
                                  int offset,
                                  int length)
        Create a new dictionary for use with fast decompress
        Parameters:
        dict - buffer containing dictionary
        offset - the offset into the buffer to read from
        length - number of bytes to use from the buffer
      • ZstdDictDecompress

        public ZstdDictDecompress​(java.nio.ByteBuffer dict)
        Create a new dictionary for use with fast decompress. The provided bytebuffer is available for reuse when the method returns.
        Parameters:
        dict - Direct ByteBuffer containing dictionary using position and limit to define range in buffer.
      • ZstdDictDecompress

        public ZstdDictDecompress​(java.nio.ByteBuffer dict,
                                  boolean byReference)
        Create a new dictionary for use with fast decompress. If byReference is true, then the native code does not copy the data but keeps a reference to the byte buffer, which must then not be modified before this context has been closed.
        Parameters:
        dict - Direct ByteBuffer containing dictionary using position and limit to define range in buffer.
        byReference - tell the native part to use the byte buffer directly and not copy the data when true.
    • Method Detail

      • getByReferenceBuffer

        public java.nio.ByteBuffer getByReferenceBuffer()
        Get the byte buffer that backs this dict, if any, or null if not backed by a byte buffer.
      • finalize

        protected void finalize()
        Overrides:
        finalize in class java.lang.Object
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable