Class ZSTDFrameParameters

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

    public class ZSTDFrameParameters
    extends Struct
    implements NativeResource

    Member documentation

    • contentSizeFlag – 1: content size will be in frame header (when known)
    • checksumFlag – 1: generate a 32-bits checksum using XXH64 algorithm at end of frame, for error detection
    • noDictIDFlag – 1: no dictID will be saved into frame header (dictID is only useful for dictionary compression)

    Layout

    
     struct ZSTD_frameParameters {
         int contentSizeFlag;
         int checksumFlag;
         int noDictIDFlag;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • CONTENTSIZEFLAG, CHECKSUMFLAG, NODICTIDFLAG

        The struct member offsets.
    • Constructor Detail

      • ZSTDFrameParameters

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

        public int contentSizeFlag()
        Returns the value of the contentSizeFlag field.
      • checksumFlag

        public int checksumFlag()
        Returns the value of the checksumFlag field.
      • noDictIDFlag

        public int noDictIDFlag()
        Returns the value of the noDictIDFlag field.
      • contentSizeFlag

        public ZSTDFrameParameters contentSizeFlag​(int value)
        Sets the specified value to the contentSizeFlag field.
      • checksumFlag

        public ZSTDFrameParameters checksumFlag​(int value)
        Sets the specified value to the checksumFlag field.
      • noDictIDFlag

        public ZSTDFrameParameters noDictIDFlag​(int value)
        Sets the specified value to the noDictIDFlag field.
      • set

        public ZSTDFrameParameters set​(int contentSizeFlag,
                                       int checksumFlag,
                                       int noDictIDFlag)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

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

        public static int ncontentSizeFlag​(long struct)
        Unsafe version of contentSizeFlag().
      • nchecksumFlag

        public static int nchecksumFlag​(long struct)
        Unsafe version of checksumFlag().
      • nnoDictIDFlag

        public static int nnoDictIDFlag​(long struct)
        Unsafe version of noDictIDFlag().
      • ncontentSizeFlag

        public static void ncontentSizeFlag​(long struct,
                                            int value)
        Unsafe version of contentSizeFlag.
      • nchecksumFlag

        public static void nchecksumFlag​(long struct,
                                         int value)
        Unsafe version of checksumFlag.
      • nnoDictIDFlag

        public static void nnoDictIDFlag​(long struct,
                                         int value)
        Unsafe version of noDictIDFlag.