Class ZSTDCompressionParameters

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ZSTDCompressionParameters extends Struct<ZSTDCompressionParameters> implements NativeResource

 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 Details

    • SIZEOF

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

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

      public static final int WINDOWLOG
      The struct member offsets.
    • CHAINLOG

      public static final int CHAINLOG
      The struct member offsets.
    • HASHLOG

      public static final int HASHLOG
      The struct member offsets.
    • SEARCHLOG

      public static final int SEARCHLOG
      The struct member offsets.
    • MINMATCH

      public static final int MINMATCH
      The struct member offsets.
    • TARGETLENGTH

      public static final int TARGETLENGTH
      The struct member offsets.
    • STRATEGY

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

    • ZSTDCompressionParameters

      public ZSTDCompressionParameters(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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<ZSTDCompressionParameters>
    • 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.
    • windowLog

      public ZSTDCompressionParameters windowLog(int value)
      Sets the specified value to the windowLog field.
    • chainLog

      public ZSTDCompressionParameters chainLog(int value)
      Sets the specified value to the chainLog field.
    • hashLog

      public ZSTDCompressionParameters hashLog(int value)
      Sets the specified value to the hashLog field.
    • searchLog

      public ZSTDCompressionParameters searchLog(int value)
      Sets the specified value to the searchLog field.
    • minMatch

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

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

      public ZSTDCompressionParameters strategy(int value)
      Sets the specified value to the strategy 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.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • 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.
    • createSafe

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

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

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

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

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

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

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

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

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