Class ZDICTCoverParams

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

    public class ZDICTCoverParams
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    k and d are the only required parameters. For others, value 0 means default.

    Member documentation

    • k – segment size : constraint: 0 < k : Reasonable range [16, 2048+]
    • ddmer size : constraint: 0 < d <= k : Reasonable range [6, 16]
    • steps – Number of steps : Only used for optimization : 0 means default (32) : Higher means more parameters checked
    • nbThreads – Number of threads : constraint: 0 < nbThreads : 1 means single-threaded : Only used for optimization : Ignored if ZSTD_MULTITHREAD is not defined.

    Layout

    
     struct ZDICT_cover_params_t {
         unsigned k;
         unsigned d;
         unsigned steps;
         unsigned nbThreads;
         ZDICT_params_t zParams;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • K, D, STEPS, NBTHREADS, ZPARAMS

        The struct member offsets.
    • Constructor Detail

      • ZDICTCoverParams

        public ZDICTCoverParams​(java.nio.ByteBuffer container)
        Creates a ZDICTCoverParams 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
      • k

        public int k()
        Returns the value of the k field.
      • d

        public int d()
        Returns the value of the d field.
      • steps

        public int steps()
        Returns the value of the steps field.
      • nbThreads

        public int nbThreads()
        Returns the value of the nbThreads field.
      • zParams

        public ZDICTCoverParams zParams​(java.util.function.Consumer<ZDICTParams> consumer)
        Passes the zParams field to the specified Consumer.
      • k

        public ZDICTCoverParams k​(int value)
        Sets the specified value to the k field.
      • d

        public ZDICTCoverParams d​(int value)
        Sets the specified value to the d field.
      • steps

        public ZDICTCoverParams steps​(int value)
        Sets the specified value to the steps field.
      • nbThreads

        public ZDICTCoverParams nbThreads​(int value)
        Sets the specified value to the nbThreads field.
      • set

        public ZDICTCoverParams set​(int k,
                                    int d,
                                    int steps,
                                    int nbThreads,
                                    ZDICTParams zParams)
        Initializes this struct with the specified values.
      • set

        public ZDICTCoverParams set​(ZDICTCoverParams src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • createSafe

        @Nullable
        public static ZDICTCoverParams createSafe​(long address)
        Like create, but returns null if address is NULL.
      • createSafe

        @Nullable
        public static ZDICTCoverParams.Buffer createSafe​(long address,
                                                         int capacity)
        Like create, but returns null if address is NULL.
      • callocStack

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

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

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

        public static ZDICTCoverParams.Buffer callocStack​(int capacity)
        Returns a new ZDICTCoverParams.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

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

        public static ZDICTCoverParams.Buffer callocStack​(int capacity,
                                                          org.lwjgl.system.MemoryStack stack)
        Returns a new ZDICTCoverParams.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
      • nk

        public static int nk​(long struct)
        Unsafe version of k().
      • nd

        public static int nd​(long struct)
        Unsafe version of d().
      • nsteps

        public static int nsteps​(long struct)
        Unsafe version of steps().
      • nnbThreads

        public static int nnbThreads​(long struct)
        Unsafe version of nbThreads().
      • nk

        public static void nk​(long struct,
                              int value)
        Unsafe version of k.
      • nd

        public static void nd​(long struct,
                              int value)
        Unsafe version of d.
      • nsteps

        public static void nsteps​(long struct,
                                  int value)
        Unsafe version of steps.
      • nnbThreads

        public static void nnbThreads​(long struct,
                                      int value)
        Unsafe version of nbThreads.
      • nzParams

        public static void nzParams​(long struct,
                                    ZDICTParams value)
        Unsafe version of zParams.