Class LZ4FFrameInfo

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class LZ4FFrameInfo
    extends org.lwjgl.system.Struct
    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 Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • BLOCKSIZEID, BLOCKMODE, CONTENTCHECKSUMFLAG, FRAMETYPE, CONTENTSIZE, DICTID, BLOCKCHECKSUMFLAG

        The struct member offsets.
    • Constructor Detail

      • LZ4FFrameInfo

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

      • sizeof

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

        public int contentChecksumFlag()
        1: frame terminated with 32-bit checksum of decompressed data; 0: disabled (default)
      • 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: disabled (default)
      • 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

        @Nullable
        public static 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​(long address,
                                                  int capacity)
        Create a LZ4FFrameInfo.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static LZ4FFrameInfo.Buffer createSafe​(long address,
                                                      int capacity)
        Like create, but returns null if address is NULL.
      • 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.
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.