Class XXH3State

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XXH3State extends Struct<XXH3State> implements NativeResource

 struct XXH3_state_t {
     XXH64_hash_t acc[8];
     unsigned char customSecret[XXH3_SECRET_DEFAULT_SIZE];
     char[64 - (XXH3_SECRET_DEFAULT_SIZE &amp; 63)];
     unsigned char buffer[256];
     XXH32_hash_t bufferedSize;
     XXH32_hash_t useSeed;
     size_t nbStripesSoFar;
     XXH64_hash_t totalLen;
     size_t nbStripesPerBlock;
     size_t secretLimit;
     XXH64_hash_t seed;
     XXH64_hash_t reserved64;
     unsigned char const * extSecret;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ACC
      The struct member offsets.
    • CUSTOMSECRET

      public static final int CUSTOMSECRET
      The struct member offsets.
    • BUFFER

      public static final int BUFFER
      The struct member offsets.
    • BUFFEREDSIZE

      public static final int BUFFEREDSIZE
      The struct member offsets.
    • USESEED

      public static final int USESEED
      The struct member offsets.
    • NBSTRIPESSOFAR

      public static final int NBSTRIPESSOFAR
      The struct member offsets.
    • TOTALLEN

      public static final int TOTALLEN
      The struct member offsets.
    • NBSTRIPESPERBLOCK

      public static final int NBSTRIPESPERBLOCK
      The struct member offsets.
    • SECRETLIMIT

      public static final int SECRETLIMIT
      The struct member offsets.
    • SEED

      public static final int SEED
      The struct member offsets.
    • RESERVED64

      public static final int RESERVED64
      The struct member offsets.
    • EXTSECRET

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

    • XXH3State

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

      public LongBuffer acc()
      Returns:
      a LongBuffer view of the acc field.
    • acc

      public long acc(int index)
      Returns:
      the value at the specified index of the acc field.
    • customSecret

      public ByteBuffer customSecret()
      Returns:
      a ByteBuffer view of the customSecret field.
    • customSecret

      public byte customSecret(int index)
      Returns:
      the value at the specified index of the customSecret field.
    • buffer

      public ByteBuffer buffer()
      Returns:
      a ByteBuffer view of the buffer field.
    • buffer

      public byte buffer(int index)
      Returns:
      the value at the specified index of the buffer field.
    • bufferedSize

      public int bufferedSize()
      Returns:
      the value of the bufferedSize field.
    • useSeed

      public int useSeed()
      Returns:
      the value of the useSeed field.
    • nbStripesSoFar

      public long nbStripesSoFar()
      Returns:
      the value of the nbStripesSoFar field.
    • totalLen

      public long totalLen()
      Returns:
      the value of the totalLen field.
    • nbStripesPerBlock

      public long nbStripesPerBlock()
      Returns:
      the value of the nbStripesPerBlock field.
    • secretLimit

      public long secretLimit()
      Returns:
      the value of the secretLimit field.
    • seed

      public long seed()
      Returns:
      the value of the seed field.
    • reserved64

      public long reserved64()
      Returns:
      the value of the reserved64 field.
    • extSecret

      public ByteBuffer extSecret(int capacity)
      Returns:
      a ByteBuffer view of the data pointed to by the extSecret field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static LongBuffer nacc(long struct)
      Unsafe version of acc().
    • nacc

      public static long nacc(long struct, int index)
      Unsafe version of acc.
    • ncustomSecret

      public static ByteBuffer ncustomSecret(long struct)
      Unsafe version of customSecret().
    • ncustomSecret

      public static byte ncustomSecret(long struct, int index)
      Unsafe version of customSecret.
    • nbuffer

      public static ByteBuffer nbuffer(long struct)
      Unsafe version of buffer().
    • nbuffer

      public static byte nbuffer(long struct, int index)
      Unsafe version of buffer.
    • nbufferedSize

      public static int nbufferedSize(long struct)
      Unsafe version of bufferedSize().
    • nuseSeed

      public static int nuseSeed(long struct)
      Unsafe version of useSeed().
    • nnbStripesSoFar

      public static long nnbStripesSoFar(long struct)
      Unsafe version of nbStripesSoFar().
    • ntotalLen

      public static long ntotalLen(long struct)
      Unsafe version of totalLen().
    • nnbStripesPerBlock

      public static long nnbStripesPerBlock(long struct)
      Unsafe version of nbStripesPerBlock().
    • nsecretLimit

      public static long nsecretLimit(long struct)
      Unsafe version of secretLimit().
    • nseed

      public static long nseed(long struct)
      Unsafe version of seed().
    • nreserved64

      public static long nreserved64(long struct)
      Unsafe version of reserved64().
    • nextSecret

      public static ByteBuffer nextSecret(long struct, int capacity)
      Unsafe version of extSecret.