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

    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()
        largest match distance: larger == more compression, more memory needed during decompression
      • chainLog

        public int chainLog()
        fully searched segment: larger == more compression, slower, more memory (useless for fast)
      • hashLog

        public int hashLog()
        dispatch table: larger == faster, more memory
      • searchLog

        public int searchLog()
        nb of searches: larger == more compression, slower
      • minMatch

        public int minMatch()
        match length searched: larger == faster decompression, sometimes less compression
      • targetLength

        public int targetLength()
        acceptable match size for optimal parser (only): larger == more compression, slower
      • strategy

        public int strategy()
        see ZSTD_strategy definition
      • 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.
      • malloc

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

        public static ZSTDCompressionParameters calloc​(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
      • calloc

        public static ZSTDCompressionParameters.Buffer calloc​(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.