Class ZSTDSequence

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ZSTDSequence extends Struct<ZSTDSequence> implements NativeResource

 struct ZSTD_Sequence {
     unsigned int offset;
     unsigned int litLength;
     unsigned int matchLength;
     unsigned int rep;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int OFFSET
      The struct member offsets.
    • LITLENGTH

      public static final int LITLENGTH
      The struct member offsets.
    • MATCHLENGTH

      public static final int MATCHLENGTH
      The struct member offsets.
    • REP

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

    • ZSTDSequence

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

      public int offset()
      Returns:
      the value of the offset field.
    • litLength

      public int litLength()
      Returns:
      the value of the litLength field.
    • matchLength

      public int matchLength()
      Returns:
      the value of the matchLength field.
    • rep

      public int rep()
      Returns:
      the value of the rep field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int noffset(long struct)
      Unsafe version of offset().
    • nlitLength

      public static int nlitLength(long struct)
      Unsafe version of litLength().
    • nmatchLength

      public static int nmatchLength(long struct)
      Unsafe version of matchLength().
    • nrep

      public static int nrep(long struct)
      Unsafe version of rep().