Class ZSTDCompressionParameters

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class ZSTDCompressionParameters
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource

    Member documentation

    • windowLog – largest match distance: larger == more compression, more memory needed during decompression
    • chainLog – fully searched segment: larger == more compression, slower, more memory (useless for fast)
    • hashLog – dispatch table: larger == faster, more memory
    • searchLog – nb of searches: larger == more compression, slower
    • minMatch – match length searched: larger == faster decompression, sometimes less compression
    • targetLength – acceptable match size for optimal parser (only): larger == more compression, slower
    • strategy – see ZSTD_strategy definition

    Layout

    
     struct ZSTD_compressionParameters {
         unsigned int windowLog;
         unsigned int chainLog;
         unsigned int hashLog;
         unsigned int searchLog;
         unsigned int minMatch;
         unsigned int targetLength;
         ZSTD_strategy strategy;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • WINDOWLOG, CHAINLOG, HASHLOG, SEARCHLOG, MINMATCH, TARGETLENGTH, STRATEGY

        The struct member offsets.
    • Constructor Detail

      • ZSTDCompressionParameters

        public ZSTDCompressionParameters​(java.nio.ByteBuffer container)
        Creates a ZSTDCompressionParameters instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • windowLog

        public int windowLog()
        Returns the value of the windowLog field.
      • chainLog

        public int chainLog()
        Returns the value of the chainLog field.
      • hashLog

        public int hashLog()
        Returns the value of the hashLog field.
      • searchLog

        public int searchLog()
        Returns the value of the searchLog field.
      • minMatch

        public int minMatch()
        Returns the value of the minMatch field.
      • targetLength

        public int targetLength()
        Returns the value of the targetLength field.
      • strategy

        public int strategy()
        Returns the value of the strategy field.
      • targetLength

        public ZSTDCompressionParameters targetLength​(int value)
        Sets the specified value to the targetLength field.
      • set

        public ZSTDCompressionParameters set​(int windowLog,
                                             int chainLog,
                                             int hashLog,
                                             int searchLog,
                                             int minMatch,
                                             int targetLength,
                                             int strategy)
        Initializes this struct with the specified values.
      • malloc

        public static ZSTDCompressionParameters malloc()
        Returns a new ZSTDCompressionParameters instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static ZSTDCompressionParameters calloc()
        Returns a new ZSTDCompressionParameters instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static ZSTDCompressionParameters create()
        Returns a new ZSTDCompressionParameters instance allocated with BufferUtils.
      • create

        public static ZSTDCompressionParameters create​(long address)
        Returns a new ZSTDCompressionParameters instance for the specified memory address.
      • mallocStack

        public static ZSTDCompressionParameters mallocStack()
        Returns a new ZSTDCompressionParameters instance allocated on the thread-local MemoryStack.
      • callocStack

        public static ZSTDCompressionParameters callocStack()
        Returns a new ZSTDCompressionParameters instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static ZSTDCompressionParameters mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new ZSTDCompressionParameters instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static ZSTDCompressionParameters callocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new ZSTDCompressionParameters instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static ZSTDCompressionParameters.Buffer callocStack​(int capacity,
                                                                   org.lwjgl.system.MemoryStack stack)
        Returns a new ZSTDCompressionParameters.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nwindowLog

        public static int nwindowLog​(long struct)
        Unsafe version of windowLog().
      • nchainLog

        public static int nchainLog​(long struct)
        Unsafe version of chainLog().
      • nhashLog

        public static int nhashLog​(long struct)
        Unsafe version of hashLog().
      • nsearchLog

        public static int nsearchLog​(long struct)
        Unsafe version of searchLog().
      • nminMatch

        public static int nminMatch​(long struct)
        Unsafe version of minMatch().
      • ntargetLength

        public static int ntargetLength​(long struct)
        Unsafe version of targetLength().
      • nstrategy

        public static int nstrategy​(long struct)
        Unsafe version of strategy().
      • nwindowLog

        public static void nwindowLog​(long struct,
                                      int value)
        Unsafe version of windowLog.
      • nchainLog

        public static void nchainLog​(long struct,
                                     int value)
        Unsafe version of chainLog.
      • nhashLog

        public static void nhashLog​(long struct,
                                    int value)
        Unsafe version of hashLog.
      • nsearchLog

        public static void nsearchLog​(long struct,
                                      int value)
        Unsafe version of searchLog.
      • nminMatch

        public static void nminMatch​(long struct,
                                     int value)
        Unsafe version of minMatch.
      • ntargetLength

        public static void ntargetLength​(long struct,
                                         int value)
        Unsafe version of targetLength.
      • nstrategy

        public static void nstrategy​(long struct,
                                     int value)
        Unsafe version of strategy.