Class ZSTDFrameParameters

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ZSTDFrameParameters extends Struct<ZSTDFrameParameters> implements NativeResource

 struct ZSTD_frameParameters {
     int contentSizeFlag;
     int checksumFlag;
     int noDictIDFlag;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int CONTENTSIZEFLAG
      The struct member offsets.
    • CHECKSUMFLAG

      public static final int CHECKSUMFLAG
      The struct member offsets.
    • NODICTIDFLAG

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

    • ZSTDFrameParameters

      public ZSTDFrameParameters(ByteBuffer container)
      Creates a ZSTDFrameParameters 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<ZSTDFrameParameters>
    • contentSizeFlag

      public int contentSizeFlag()
      Returns:
      the value of the contentSizeFlag field.
    • checksumFlag

      public int checksumFlag()
      Returns:
      the value of the checksumFlag field.
    • noDictIDFlag

      public int noDictIDFlag()
      Returns:
      the value of the noDictIDFlag field.
    • contentSizeFlag

      public ZSTDFrameParameters contentSizeFlag(int value)
      Sets the specified value to the contentSizeFlag field.
    • checksumFlag

      public ZSTDFrameParameters checksumFlag(int value)
      Sets the specified value to the checksumFlag field.
    • noDictIDFlag

      public ZSTDFrameParameters noDictIDFlag(int value)
      Sets the specified value to the noDictIDFlag field.
    • set

      public ZSTDFrameParameters set(int contentSizeFlag, int checksumFlag, int noDictIDFlag)
      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 ZSTDFrameParameters malloc()
      Returns a new ZSTDFrameParameters instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int ncontentSizeFlag(long struct)
      Unsafe version of contentSizeFlag().
    • nchecksumFlag

      public static int nchecksumFlag(long struct)
      Unsafe version of checksumFlag().
    • nnoDictIDFlag

      public static int nnoDictIDFlag(long struct)
      Unsafe version of noDictIDFlag().
    • ncontentSizeFlag

      public static void ncontentSizeFlag(long struct, int value)
      Unsafe version of contentSizeFlag.
    • nchecksumFlag

      public static void nchecksumFlag(long struct, int value)
      Unsafe version of checksumFlag.
    • nnoDictIDFlag

      public static void nnoDictIDFlag(long struct, int value)
      Unsafe version of noDictIDFlag.