Class ZDICTParams

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

    public class ZDICTParams
    extends Struct
    implements NativeResource

    Member documentation

    • compressionLevel – optimize for a specific zstd compression level; 0 means default
    • notificationLevel – write log to stderr; 0 = none (default); 1 = errors; 2 = progression; 3 = details; 4 = debug;
    • dictID – force dictID value; 0 means auto mode (32-bits random value)

    Layout

    
     struct ZDICT_params_t {
         int compressionLevel;
         unsigned notificationLevel;
         unsigned dictID;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • COMPRESSIONLEVEL, NOTIFICATIONLEVEL, DICTID

        The struct member offsets.
    • Constructor Detail

      • ZDICTParams

        public ZDICTParams​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • compressionLevel

        public int compressionLevel()
        Returns the value of the compressionLevel field.
      • notificationLevel

        public int notificationLevel()
        Returns the value of the notificationLevel field.
      • dictID

        public int dictID()
        Returns the value of the dictID field.
      • 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
      • create

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

        @Nullable
        public static ZDICTParams createSafe​(long address)
        Like create, but returns null if address is NULL.
      • 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

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

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

        public static ZDICTParams callocStack​(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
      • callocStack

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

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