Class LZ4FCompressOptions

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

    public class LZ4FCompressOptions
    extends Struct
    implements NativeResource

    Member documentation

    • stableSrc1 == src content will remain present on future calls to LZ4F_compress(); skip copying src content within tmp buffer

    Layout

    
     struct LZ4F_compressOptions_t {
         unsigned stableSrc;
         unsigned reserved[3];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STABLESRC, RESERVED

        The struct member offsets.
    • Constructor Detail

      • LZ4FCompressOptions

        public LZ4FCompressOptions​(java.nio.ByteBuffer container)
        Creates a LZ4FCompressOptions 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
      • stableSrc

        public int stableSrc()
        Returns the value of the stableSrc field.
      • reserved

        public java.nio.IntBuffer reserved()
        Returns a IntBuffer view of the reserved field.
      • reserved

        public int reserved​(int index)
        Returns the value at the specified index of the reserved field.
      • stableSrc

        public LZ4FCompressOptions stableSrc​(int value)
        Sets the specified value to the stableSrc field.
      • reserved

        public LZ4FCompressOptions reserved​(java.nio.IntBuffer value)
        Copies the specified IntBuffer to the reserved field.
      • reserved

        public LZ4FCompressOptions reserved​(int index,
                                            int value)
        Sets the specified value at the specified index of the reserved field.
      • set

        public LZ4FCompressOptions set​(int stableSrc,
                                       java.nio.IntBuffer reserved)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

        public static LZ4FCompressOptions callocStack()
        Returns a new LZ4FCompressOptions instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static LZ4FCompressOptions mallocStack​(MemoryStack stack)
        Returns a new LZ4FCompressOptions instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static LZ4FCompressOptions callocStack​(MemoryStack stack)
        Returns a new LZ4FCompressOptions instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • nstableSrc

        public static int nstableSrc​(long struct)
        Unsafe version of stableSrc().
      • nreserved

        public static java.nio.IntBuffer nreserved​(long struct)
        Unsafe version of reserved().
      • nreserved

        public static int nreserved​(long struct,
                                    int index)
        Unsafe version of reserved.
      • nstableSrc

        public static void nstableSrc​(long struct,
                                      int value)
        Unsafe version of stableSrc.
      • nreserved

        public static void nreserved​(long struct,
                                     java.nio.IntBuffer value)
        Unsafe version of reserved.
      • nreserved

        public static void nreserved​(long struct,
                                     int index,
                                     int value)
        Unsafe version of reserved.