Class XXH3State

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ACC, CUSTOMSECRET, BUFFER, BUFFEREDSIZE, USESEED, NBSTRIPESSOFAR, TOTALLEN, NBSTRIPESPERBLOCK, SECRETLIMIT, SEED, RESERVED64, EXTSECRET

        The struct member offsets.
    • Constructor Detail

      • XXH3State

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

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • acc

        public java.nio.LongBuffer acc()
        
        public long acc​(int index)
        
        the 8 accumulators. Similar to v in XXH32_state_s and XXH64_state_s.
      • customSecret

        public java.nio.ByteBuffer customSecret()
        
        public byte customSecret​(int index)
        
        used to store a custom secret generated from a seed
      • buffer

        public java.nio.ByteBuffer buffer()
        
        public byte buffer​(int index)
        
        the internal buffer. See XXH32_state_s::mem32.
      • bufferedSize

        public int bufferedSize()
        the amount of memory in buffer, See XXH32_state_s::memsize.
      • useSeed

        public int useSeed()
        reserved field. Needed for padding on 64-bit.
      • nbStripesSoFar

        public long nbStripesSoFar()
        number or stripes processed
      • totalLen

        public long totalLen()
        total length hashed. 64-bit even on 32-bit targets.
      • nbStripesPerBlock

        public long nbStripesPerBlock()
        number of stripes per block
      • secretLimit

        public long secretLimit()
        size of customSecret or extSecret
      • seed

        public long seed()
        seed for _withSeed variants. Must be zero otherwise, see XXH3_INITSTATE().
      • reserved64

        public long reserved64()
        reserved field
      • extSecret

        public java.nio.ByteBuffer extSecret​(int capacity)
        Parameters:
        capacity - the number of elements in the returned buffer
        Returns:
        reference to an external secret for the _withSecret variants, NULL for other variants
      • 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

        @Nullable
        public static 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

        @Nullable
        public static 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​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

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

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

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

        public static XXH3State malloc​(org.lwjgl.system.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​(org.lwjgl.system.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,
                                              org.lwjgl.system.MemoryStack stack)
        Returns a new XXH3State.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

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

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

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

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

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

        public static java.nio.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 java.nio.ByteBuffer nextSecret​(long struct,
                                                     int capacity)
        Unsafe version of extSecret.