Class LZ4StreamInternal

All Implemented Interfaces:
Pointer

public class LZ4StreamInternal extends Struct<LZ4StreamInternal>

 struct LZ4_stream_t_internal {
     LZ4_u32 hashTable[LZ4_HASH_SIZE_U32];
     LZ4_byte const * dictionary;
     {@link LZ4StreamInternal LZ4_stream_t_internal} * const dictCtx;
     LZ4_u32 currentOffset;
     LZ4_u32 tableType;
     LZ4_u32 dictSize;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int HASHTABLE
      The struct member offsets.
    • DICTIONARY

      public static final int DICTIONARY
      The struct member offsets.
    • DICTCTX

      public static final int DICTCTX
      The struct member offsets.
    • CURRENTOFFSET

      public static final int CURRENTOFFSET
      The struct member offsets.
    • TABLETYPE

      public static final int TABLETYPE
      The struct member offsets.
    • DICTSIZE

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

    • LZ4StreamInternal

      public LZ4StreamInternal(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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<LZ4StreamInternal>
    • hashTable

      public 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.
    • dictionary

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

      public LZ4StreamInternal dictCtx()
      Returns:
      a LZ4StreamInternal view of the struct pointed to by the dictCtx field.
    • currentOffset

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

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

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

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

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

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

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

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

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

      public static ByteBuffer ndictionary(long struct, int capacity)
      Unsafe version of dictionary.
    • ndictCtx

      public static LZ4StreamInternal ndictCtx(long struct)
      Unsafe version of dictCtx().
    • ncurrentOffset

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

      public static int ntableType(long struct)
      Unsafe version of tableType().
    • ndictSize

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