Class ZDICTParams

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<ZDICTParams>
org.lwjgl.util.zstd.ZDICTParams
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class ZDICTParams extends org.lwjgl.system.Struct<ZDICTParams> implements org.lwjgl.system.NativeResource

Layout


 struct ZDICT_params_t {
     int compressionLevel();
     unsigned notificationLevel();
     unsigned dictID();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • COMPRESSIONLEVEL

      public static final int COMPRESSIONLEVEL
      The struct member offsets.
    • NOTIFICATIONLEVEL

      public static final int NOTIFICATIONLEVEL
      The struct member offsets.
    • DICTID

      public static final int DICTID
      The struct member offsets.
  • Constructor Details

    • ZDICTParams

      public ZDICTParams(ByteBuffer container)
      Creates a ZDICTParams 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<ZDICTParams>
    • compressionLevel

      public int compressionLevel()
      optimize for a specific zstd compression level; 0 means default
    • notificationLevel

      public int notificationLevel()
      write log to stderr; 0 = none (default); 1 = errors; 2 = progression; 3 = details; 4 = debug;
    • dictID

      public int dictID()
      force dictID value; 0 means auto mode (32-bits random value).

      NOTE: The zstd format reserves some dictionary IDs for future use. You may use them in private settings, but be warned that they may be used by zstd in a public dictionary registry in the future. These dictionary IDs are:

      
       - low range  : ≤ 32767
       - high range : ≥ (2^31)
    • compressionLevel

      public ZDICTParams compressionLevel(int value)
      Sets the specified value to the compressionLevel() field.
    • notificationLevel

      public ZDICTParams notificationLevel(int value)
      Sets the specified value to the notificationLevel() field.
    • dictID

      public ZDICTParams dictID(int value)
      Sets the specified value to the dictID() field.
    • set

      public ZDICTParams set(int compressionLevel, int notificationLevel, int dictID)
      Initializes this struct with the specified values.
    • set

      public ZDICTParams set(ZDICTParams src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

      public static ZDICTParams create(long address)
      Returns a new ZDICTParams instance for the specified memory address.
    • createSafe

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

      public static ZDICTParams.Buffer malloc(int capacity)
      Returns a new ZDICTParams.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static ZDICTParams.Buffer calloc(int capacity)
      Returns a new ZDICTParams.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static ZDICTParams.Buffer create(int capacity)
      Returns a new ZDICTParams.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static ZDICTParams.Buffer create(long address, int capacity)
      Create a ZDICTParams.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

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

      @Deprecated public static ZDICTParams mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static ZDICTParams callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static ZDICTParams mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static ZDICTParams callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static ZDICTParams.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static ZDICTParams.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static ZDICTParams.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static ZDICTParams.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

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

      public static int ncompressionLevel(long struct)
      Unsafe version of compressionLevel().
    • nnotificationLevel

      public static int nnotificationLevel(long struct)
      Unsafe version of notificationLevel().
    • ndictID

      public static int ndictID(long struct)
      Unsafe version of dictID().
    • ncompressionLevel

      public static void ncompressionLevel(long struct, int value)
      Unsafe version of compressionLevel.
    • nnotificationLevel

      public static void nnotificationLevel(long struct, int value)
      Unsafe version of notificationLevel.
    • ndictID

      public static void ndictID(long struct, int value)
      Unsafe version of dictID.