Class LZ4HCCCtxInternal

All Implemented Interfaces:
Pointer

public class LZ4HCCCtxInternal extends Struct<LZ4HCCCtxInternal>

Layout


 struct LZ4HC_CCtx_internal {
     LZ4_u32 hashTable[LZ4HC_HASHTABLESIZE];
     LZ4_u16 chainTable[LZ4HC_MAXD];
     LZ4_byte const * end(int);
     LZ4_byte const * prefixStart(int);
     LZ4_byte const * dictStart(int);
     LZ4_u32 dictLimit();
     LZ4_u32 lowLimit();
     LZ4_u32 nextToUpdate();
     short compressionLevel;
     LZ4_i8 favorDecSpeed();
     LZ4_i8 dirty();
     LZ4HC_CCtx_internal * const dictCtx;
 }
  • 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.
    • CHAINTABLE

      public static final int CHAINTABLE
      The struct member offsets.
    • END

      public static final int END
      The struct member offsets.
    • PREFIXSTART

      public static final int PREFIXSTART
      The struct member offsets.
    • DICTSTART

      public static final int DICTSTART
      The struct member offsets.
    • DICTLIMIT

      public static final int DICTLIMIT
      The struct member offsets.
    • LOWLIMIT

      public static final int LOWLIMIT
      The struct member offsets.
    • NEXTTOUPDATE

      public static final int NEXTTOUPDATE
      The struct member offsets.
    • COMPRESSIONLEVEL

      public static final int COMPRESSIONLEVEL
      The struct member offsets.
    • FAVORDECSPEED

      public static final int FAVORDECSPEED
      The struct member offsets.
    • DIRTY

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

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

    • LZ4HCCCtxInternal

      public LZ4HCCCtxInternal(ByteBuffer container)
      Creates a LZ4HCCCtxInternal 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<LZ4HCCCtxInternal>
    • 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.
    • chainTable

      public ShortBuffer chainTable()
      Returns:
      a ShortBuffer view of the chainTable field.
    • chainTable

      public short chainTable(int index)
      Returns:
      the value at the specified index of the chainTable field.
    • end

      public ByteBuffer end(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      next block here to continue on current prefix
    • prefixStart

      public ByteBuffer prefixStart(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      Indexes relative to this position
    • dictStart

      public ByteBuffer dictStart(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      alternate reference for extDict
    • dictLimit

      public int dictLimit()
      below that point, need extDict
    • lowLimit

      public int lowLimit()
      below that point, no more dict
    • nextToUpdate

      public int nextToUpdate()
      index from which to continue dictionary update
    • compressionLevel

      public short compressionLevel()
      Returns:
      the value of the compressionLevel field.
    • favorDecSpeed

      public byte favorDecSpeed()
      favor decompression speed if this flag set, otherwise, favor compression ratio
    • dirty

      public byte dirty()
      stream has to be fully reset if this flag is set
    • dictCtx

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

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

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

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

      @Nullable public static LZ4HCCCtxInternal.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.
    • nchainTable

      public static ShortBuffer nchainTable(long struct)
      Unsafe version of chainTable().
    • nchainTable

      public static short nchainTable(long struct, int index)
      Unsafe version of chainTable.
    • nend

      public static ByteBuffer nend(long struct, int capacity)
      Unsafe version of end.
    • nprefixStart

      public static ByteBuffer nprefixStart(long struct, int capacity)
      Unsafe version of prefixStart.
    • ndictStart

      public static ByteBuffer ndictStart(long struct, int capacity)
      Unsafe version of dictStart.
    • ndictLimit

      public static int ndictLimit(long struct)
      Unsafe version of dictLimit().
    • nlowLimit

      public static int nlowLimit(long struct)
      Unsafe version of lowLimit().
    • nnextToUpdate

      public static int nnextToUpdate(long struct)
      Unsafe version of nextToUpdate().
    • ncompressionLevel

      public static short ncompressionLevel(long struct)
      Unsafe version of compressionLevel().
    • nfavorDecSpeed

      public static byte nfavorDecSpeed(long struct)
      Unsafe version of favorDecSpeed().
    • ndirty

      public static byte ndirty(long struct)
      Unsafe version of dirty().
    • ndictCtx

      public static LZ4HCCCtxInternal ndictCtx(long struct)
      Unsafe version of dictCtx().