Class LZ4StreamInternal

  • All Implemented Interfaces:
    Pointer

    public class LZ4StreamInternal
    extends Struct

    Layout

    
     struct LZ4_stream_t_internal {
         uint32_t hashTable[LZ4_HASH_SIZE_U32];
         uint32_t currentOffset;
         uint32_t initCheck;
         uint16_t tableType;
         uint8_t const * dictionary;
         LZ4_stream_t_internal * const dictCtx;
         uint32_t dictSize;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • HASHTABLE, CURRENTOFFSET, INITCHECK, TABLETYPE, DICTIONARY, DICTCTX, DICTSIZE

        The struct member offsets.
    • Constructor Detail

      • LZ4StreamInternal

        public LZ4StreamInternal​(java.nio.ByteBuffer container)
        Creates a LZ4StreamInternal 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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • hashTable

        public java.nio.IntBuffer hashTable()
        Returns a IntBuffer view of the hashTable field.
      • hashTable

        public int hashTable​(int index)
        Returns the value at the specified index of the hashTable field.
      • currentOffset

        public int currentOffset()
        Returns the value of the currentOffset field.
      • initCheck

        public int initCheck()
        Returns the value of the initCheck field.
      • tableType

        public short tableType()
        Returns the value of the tableType field.
      • dictionary

        public java.nio.ByteBuffer dictionary​(int capacity)
        Returns a ByteBuffer view of the data pointed to by the dictionary field.
        Parameters:
        capacity - the number of elements in the returned buffer
      • dictSize

        public int dictSize()
        Returns the value of the dictSize field.
      • createSafe

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

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

        public static java.nio.IntBuffer nhashTable​(long struct)
        Unsafe version of hashTable().
      • nhashTable

        public static int nhashTable​(long struct,
                                     int index)
        Unsafe version of hashTable.
      • ncurrentOffset

        public static int ncurrentOffset​(long struct)
        Unsafe version of currentOffset().
      • ninitCheck

        public static int ninitCheck​(long struct)
        Unsafe version of initCheck().
      • ntableType

        public static short ntableType​(long struct)
        Unsafe version of tableType().
      • ndictionary

        public static java.nio.ByteBuffer ndictionary​(long struct,
                                                      int capacity)
        Unsafe version of dictionary.
      • ndictSize

        public static int ndictSize​(long struct)
        Unsafe version of dictSize().