Class LZ4FFrameInfo

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

    public class LZ4FFrameInfo
    extends Struct
    implements NativeResource
    Makes it possible to set or read frame parameters.

    It's not required to set all fields, as long as the structure was initially memset() to zero. For all fields, 0 sets it to default value.

    Member documentation

    • blockSizeID0 == default. One of:
    • blockMode0 == default. One of:
    • contentChecksumFlag – 1: frame terminated with 32-bit checksum of decompressed data; 0: disabled (default)
    • frameType – read-only field. One of:
    • contentSize – size of uncompressed content ; 0 == unknown
    • dictID – dictionary ID, sent by compressor to help decoder select correct dictionary; 0 == no dictID provided
    • blockChecksumFlag – 1: each block followed by a checksum of block's compressed data; 0: disabled (default)


     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.

        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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • blockSizeID

        public int blockSizeID()
        Returns the value of the blockSizeID field.
      • blockMode

        public int blockMode()
        Returns the value of the blockMode field.
      • contentChecksumFlag

        public int contentChecksumFlag()
        Returns the value of the contentChecksumFlag field.
      • frameType

        public int frameType()
        Returns the value of the frameType field.
      • contentSize

        public long contentSize()
        Returns the value of the contentSize field.
      • dictID

        public int dictID()
        Returns the value of the dictID field.
      • blockChecksumFlag

        public int blockChecksumFlag()
        Returns the value of the blockChecksumFlag field.
      • 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.
        src - the source struct
        this struct
      • create

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

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

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

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

        public static LZ4FFrameInfo callocStack​(MemoryStack stack)
        Returns a new LZ4FFrameInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
        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.