Class LZ4FFrameInfo

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<LZ4FFrameInfo>
org.lwjgl.util.lz4.LZ4FFrameInfo
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class LZ4FFrameInfo extends org.lwjgl.system.Struct<LZ4FFrameInfo> implements org.lwjgl.system.NativeResource
Makes it possible to set or read frame parameters.

Structure must be first init to 0, using memset(), setting all parameters to default. It's then possible to update selectively some parameter.

Layout


 struct LZ4F_frameInfo_t {
     LZ4F_blockSizeID_t blockSizeID();
     LZ4F_blockMode_t blockMode();
     LZ4F_contentChecksum_t contentChecksumFlag();
     LZ4F_frameType_t frameType();
     unsigned long long contentSize();
     unsigned dictID();
     LZ4F_blockChecksum_t blockChecksumFlag();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int BLOCKSIZEID
      The struct member offsets.
    • BLOCKMODE

      public static final int BLOCKMODE
      The struct member offsets.
    • CONTENTCHECKSUMFLAG

      public static final int CONTENTCHECKSUMFLAG
      The struct member offsets.
    • FRAMETYPE

      public static final int FRAMETYPE
      The struct member offsets.
    • CONTENTSIZE

      public static final int CONTENTSIZE
      The struct member offsets.
    • DICTID

      public static final int DICTID
      The struct member offsets.
    • BLOCKCHECKSUMFLAG

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

    • LZ4FFrameInfo

      public LZ4FFrameInfo(ByteBuffer container)
      Creates a LZ4FFrameInfo 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<LZ4FFrameInfo>
    • blockSizeID

      public int blockSizeID()
      0 == default ({@link LZ4Frame#LZ4F_max64KB max64KB}). One of:
      max64KBmax256KBmax1MBmax4MB
    • blockMode

      public int blockMode()
      0 == default ({@link LZ4Frame#LZ4F_blockLinked blockLinked}). One of:
      blockLinkedblockIndependentblockChecksumEnabled
    • contentChecksumFlag

      public int contentChecksumFlag()
      1: add a 32-bit checksum of frame's decompressed data; 0: disabled (default)
    • frameType

      public int frameType()
      read-only field. One of:
      frameskippableFrame
    • contentSize

      public long contentSize()
      size of uncompressed content ; 0 == unknown
    • dictID

      public int dictID()
      dictionary ID, sent by compressor to help decoder select correct dictionary; 0 == no dictID provided
    • blockChecksumFlag

      public int blockChecksumFlag()
      1: each block followed by a checksum of block's compressed data; 0: default (disabled)
    • blockSizeID

      public LZ4FFrameInfo blockSizeID(int value)
      Sets the specified value to the blockSizeID() field.
    • blockMode

      public LZ4FFrameInfo blockMode(int value)
      Sets the specified value to the blockMode() field.
    • contentChecksumFlag

      public LZ4FFrameInfo contentChecksumFlag(int value)
      Sets the specified value to the contentChecksumFlag() field.
    • frameType

      public LZ4FFrameInfo frameType(int value)
      Sets the specified value to the frameType() field.
    • contentSize

      public LZ4FFrameInfo contentSize(long value)
      Sets the specified value to the contentSize() field.
    • dictID

      public LZ4FFrameInfo dictID(int value)
      Sets the specified value to the dictID() field.
    • blockChecksumFlag

      public LZ4FFrameInfo blockChecksumFlag(int value)
      Sets the specified value to the blockChecksumFlag() field.
    • set

      public LZ4FFrameInfo set(int blockSizeID, int blockMode, int contentChecksumFlag, int frameType, long contentSize, int dictID, int blockChecksumFlag)
      Initializes this struct with the specified values.
    • set

      public LZ4FFrameInfo set(LZ4FFrameInfo src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static LZ4FFrameInfo.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 LZ4FFrameInfo.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 LZ4FFrameInfo malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new LZ4FFrameInfo instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

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

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

      public static int nblockSizeID(long struct)
      Unsafe version of blockSizeID().
    • nblockMode

      public static int nblockMode(long struct)
      Unsafe version of blockMode().
    • ncontentChecksumFlag

      public static int ncontentChecksumFlag(long struct)
      Unsafe version of contentChecksumFlag().
    • nframeType

      public static int nframeType(long struct)
      Unsafe version of frameType().
    • ncontentSize

      public static long ncontentSize(long struct)
      Unsafe version of contentSize().
    • ndictID

      public static int ndictID(long struct)
      Unsafe version of dictID().
    • nblockChecksumFlag

      public static int nblockChecksumFlag(long struct)
      Unsafe version of blockChecksumFlag().
    • nblockSizeID

      public static void nblockSizeID(long struct, int value)
      Unsafe version of blockSizeID.
    • nblockMode

      public static void nblockMode(long struct, int value)
      Unsafe version of blockMode.
    • ncontentChecksumFlag

      public static void ncontentChecksumFlag(long struct, int value)
      Unsafe version of contentChecksumFlag.
    • nframeType

      public static void nframeType(long struct, int value)
      Unsafe version of frameType.
    • ncontentSize

      public static void ncontentSize(long struct, long value)
      Unsafe version of contentSize.
    • ndictID

      public static void ndictID(long struct, int value)
      Unsafe version of dictID.
    • nblockChecksumFlag

      public static void nblockChecksumFlag(long struct, int value)
      Unsafe version of blockChecksumFlag.